PaulRahoi Posted December 18, 2015 Share Posted December 18, 2015 I have thousands of old PageMaker files which I want to dump in a directory, and open/save each one of them as PDF or HTML-- anything but PageMaker, which is a dead format going forward.But for the sake of simplicity, I would simply like to see an .au3 module which does something like this:Loops through every file in a directory (assume they are all Microsoft Word files).Opens each one with Microsoft Word.Saves each one in the same directory as PDF or the older 97-2003 Word format (just something different).I looked in the "AutoIt Example Scripts" but didn't see anything like this... Can anyone point me to such an example, or simply create one (if it is not too difficult)? I am totally new to AutoIT, so any help would be greatly appreciated.Thanks in advance,Paul. Link to comment Share on other sites More sharing options...
jguinch Posted December 18, 2015 Share Posted December 18, 2015 Use the Word UDF to open the file, and save it to PDF :#include <Word.au3> Local $oWord = _Word_Create(False) Local $oDoc = _Word_DocOpen($oWord, @ScriptDir & "\theFile.doc") _Word_DocSaveAs($oDoc, @ScriptDir & "\theFile.pdf", $wdFormatPDF) _Word_Quit($oWord) Spoiler Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF Link to comment Share on other sites More sharing options...
PaulRahoi Posted December 18, 2015 Author Share Posted December 18, 2015 Thanks, but... the "Word" example was just for the sake of an example (because everyone has Word on their PC, and could thus help me with such an example).What I REALLY want is (ultimately) PageMaker. But for now, I'm looking for an example in Word (or WordPad, whatever).And they key point is the LOOPING through all files in a directory.Anyone? Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted December 18, 2015 Moderators Share Posted December 18, 2015 (edited) @PaulRahoi, for the looping look at _FileListToArray, or _FileListToArrayRec (depending on your needs for a recursive search) in the help file. The examples should speak directly to what you're trying to do. Edited December 18, 2015 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
PaulRahoi Posted December 21, 2015 Author Share Posted December 21, 2015 @PaulRahoi, for the looping look at _FileListToArray, or _FileListToArrayRec (depending on your needs for a recursive search) in the help file. The examples should speak directly to what you're trying to do.That helps. Thanks. Link to comment Share on other sites More sharing options...
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