Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving or exporting a word document as pdf

Status
Not open for further replies.
Apr 8, 2021
5
IN
Saving or exporting a word document as pdf takes very long, using VBscript. Is there way to run save as on high priority or to allocate high memory to the command so that it execute faster.



Set doc = wrdApp.Documents.Open(myfiledoc)

Doc.ExportAsFixedFormat myfilepdf,17,False,0,0,,,0,False,True,1


Idea is to reduce the execution time for the export command or to run export command in background and get control back to process another file.

Thanks
 
Thanks for your reply Rick998....

But in between open and save I my program looks for certain info in document, based on which it gives names to pdfs
 
>n between open and save

Open and save are pretty much fixed items in terms of performance - drive throughput will be the bottleneck here, not thread priority. And high memory is no longer a thing! Although I suppose what you really mean is wheteher ity is possible to allocate/reserve some amount of RAM for yourtt process. Well, Windows has very highly tuned RAM optimisation algorithms in play, and it is unlikely that you can improve things by interfering with it (even if VBScript had RAM allocation/reservation capabilities). That being said I suppose it is possible (although extremely unlikely) that you have so little RAM that a document can only load in chunks, which might possibly affect open/save performance if only part of the document could be held in RAM at any given time. Unfortunately, if this IS the case, there is little you can do about this using VBScript. But to be honest, it sounds like "my program looks for certain info in document, based on which it gives names to pdfs" might be the performance killer. Have you looked at optimising this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top