KickStarter15 Posted June 15, 2017 Author Posted June 15, 2017 @Subz and @mLipok, Do I need to declare the filename of a PDF file for the below code? To run the program? or can I use wildcard "*.pdf" to declare any file with .pdf extension. I tried having it this way ....Local $oDoc = _Word_DocOpen($oWord, @ScriptDir & "\" & "*.pdf")... but the program won't work, it will flagged as missing. Local $oDoc = _Word_DocOpen($oWord, @ScriptDir & "\Example.pdf") Is there a way to use this "*.pdf" and not "Example.pdf"? Thanks! KS15 Programming is "To make it so simple that there are obviously no deficiencies" or "To make it so complicated that there are no obvious deficiencies" by C.A.R. Hoare.
KickStarter15 Posted June 15, 2017 Author Posted June 15, 2017 Got it guys, sorry. I forgot to use "FileFindFirstFile" function. Just ignore the last issue. $FilePath = @ScriptDir & "\" Local $hSearch = FileFindFirstFile($FilePath & "*.pdf") $aFileName = FileFindNextFile($hSearch) Programming is "To make it so simple that there are obviously no deficiencies" or "To make it so complicated that there are no obvious deficiencies" by C.A.R. Hoare.
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