LeggoMyEggo
New Member
- Joined
- Feb 15, 2011
- Messages
- 25
Hello all,
I am working on exporting a pdf so that it can be accessed easily from a large number of computers. However, when new data is calculated twice a day I would like to save over this pdf with a new one. Excel gives me an error if I try and export the pdf and someone has the file open (which is bound to happen if I send out the file location)...
How can I distribute a pdf file and still be able to replace it?
I am fairly flexible and I'm just looking for a solution so if this would work better with .xps or something else, I am open to a solution.
I tried making the file read-only but that doesn't appear to work. Will it work and I am just not doing it properly?
My code to export the file is:
Thanks,
Alex
I am working on exporting a pdf so that it can be accessed easily from a large number of computers. However, when new data is calculated twice a day I would like to save over this pdf with a new one. Excel gives me an error if I try and export the pdf and someone has the file open (which is bound to happen if I send out the file location)...
How can I distribute a pdf file and still be able to replace it?
I am fairly flexible and I'm just looking for a solution so if this would work better with .xps or something else, I am open to a solution.
I tried making the file read-only but that doesn't appear to work. Will it work and I am just not doing it properly?
My code to export the file is:
Code:
ConstantFileName = "string for file location"
Application.PrintCommunication = True
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ConstantFileName _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
Thanks,
Alex