tben2505 Posted December 17, 2015 Author Posted December 17, 2015 Don't suppose you have one to save as PDF do you!?
vikpaw Posted December 17, 2015 Posted December 17, 2015 If you have Adobe Pro, or possibly other third party pdf programs, you can just bulk print files as PDF
tben2505 Posted January 4, 2016 Author Posted January 4, 2016 If you have Adobe Pro, or possibly other third party pdf programs, you can just bulk print files as PDF Hi vikpaw, this can't be done from XML - and once converted to Word - it's painfully slow to convert - I have Adobe Pro. If only SIMS exported the files as PDF quickly!
vikpaw Posted January 4, 2016 Posted January 4, 2016 SIMS only converts to PDF when being used with Sharepoint. I would have thought once opened, in Word you can print to PDF - as well as the Word option for doing it, Adobe Pro should provide a driver. What you need is a script to open each file in Word, then use your built-in Adobe to print to. Would take a bit of meddling and probably not easy to write without actually doing it manually on your system to see what options are available. You don't fancy modifying one of the existing scripts to do it...?
tben2505 Posted January 4, 2016 Author Posted January 4, 2016 Yep that's what's needed - and I'd certainly do it myself on the script if I knew how - but that's why I'm asking!
tben2505 Posted January 4, 2016 Author Posted January 4, 2016 To be fair, in WORD you can SAVE AS PDF, so Pro isn't needed, since this script is opening the XML and saving as DOC/X I assumed it might be possible to simply change that filetype, I just can't figure out how!
RichCowell Posted January 4, 2016 Posted January 4, 2016 I just did it with a batch file rather than VBS... ren *.xml *.doc Then drag the files (not the folder) onto the batch file... renames the file extension and they work straight away, no opening/resaving involved... We then compile the into one PDF to archive and Acrobat will import the converted Doc files...
vikpaw Posted January 4, 2016 Posted January 4, 2016 (edited) I always used to just rename them for bulk printing. If you do want to play with the script, I've not tested, so not relisting the entire code, but if you modify this line in the code on post 3 it might use the built-in save as pdf feature. I can't say how quick it would be, saving / printing to pdf always seems slow. myDoc.SaveAs oFol.Path & "\" & left(FSO.GetFileName(oFil), Len(FSO.GetFileName(oFil))-4) & ".doc", 0 Change to: myDoc.SaveAs oFol.Path & "\" & left(FSO.GetFileName(oFil), Len(FSO.GetFileName(oFil))-4) & ".pdf", 17 What I've done is change the filename extension, and then told it to use the built-in pdf fileformat. It might work.. Edited January 4, 2016 by vikpaw edition
tben2505 Posted January 4, 2016 Author Posted January 4, 2016 I just did it with a batch file rather than VBS... Then drag the files (not the folder) onto the batch file... renames the file extension and they work straight away, no opening/resaving involved... We then compile the into one PDF to archive and Acrobat will import the converted Doc files... Hi Rich - can you let me know how you can create this batch file? I've tried to create a file with your text and saving as ".bat" or ".cmd" but nether seem to work.. Cheers Tom
tben2505 Posted January 4, 2016 Author Posted January 4, 2016 I always used to just rename them for bulk printing. If you do want to play with the script, I've not tested, so not relisting the entire code, but if you modify this line in the code on post 3 it might use the built-in save as pdf feature. I can't say how quick it would be, saving / printing to pdf always seems slow. myDoc.SaveAs oFol.Path & "\" & left(FSO.GetFileName(oFil), Len(FSO.GetFileName(oFil))-4) & ".doc", 0 Change to: myDoc.SaveAs oFol.Path & "\" & left(FSO.GetFileName(oFil), Len(FSO.GetFileName(oFil))-4) & ".pdf", 17 What I've done is change the filename extension, and then told it to use the built-in pdf fileformat. It might work.. Hey Vikpaw! Just tried this - seemed to be saving but then the folder is just blank afterwards!
vikpaw Posted January 4, 2016 Posted January 4, 2016 For the batch file, you might need to make sure it is in the same folder as the files. Or possibly put the batch and files all in a folder on the desktop. They can be funny about where they run from, and relative links to files. As for the pdf script, i'm not sure, as I said, not tested.
RichCowell Posted January 4, 2016 Posted January 4, 2016 Hi Rich - can you let me know how you can create this batch file? I've tried to create a file with your text and saving as ".bat" or ".cmd" but nether seem to work.. Cheers Tom I'll send it tomorrow, escaped for the day now... It didn't need to run in the same folder or anything, well it hasn't when we've used it... It's literally just that short code, saved as .bat and that's it...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now