You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello...
Can someone help with this?....I found a cool script to change several word docs in a folder to PDFs......... I just wish it could print the PDF (or word doc) to the default printer also...
Here's the script I found:
'Convert .doc or .docx to .pdf files via Send To menu
Set fso = CreateObject("Scripting.FileSystemObject")
For i= 0 To WScript.Arguments.Count -1
docPath = WScript.Arguments(i)
docPath = fso.GetAbsolutePathName(docPath)
If LCase(Right(docPath, 4)) = ".doc" Or LCase(Right(docPath, 5)) = ".docx" Then
Set objWord = CreateObject("Word.Application")
pdfPath = fso.GetParentFolderName(docPath) & "" & _
fso.GetBaseName(docpath) & ".pdf"
objWord.Visible = False
Set objDoc = objWord.documents.open(docPath)
objDoc.saveas pdfPath, 17
objDoc.Close
objWord.Quit
End If
Next
The text was updated successfully, but these errors were encountered:
Hello...
Can someone help with this?....I found a cool script to change several word docs in a folder to PDFs......... I just wish it could print the PDF (or word doc) to the default printer also...
Here's the script I found:
'Convert .doc or .docx to .pdf files via Send To menu
Set fso = CreateObject("Scripting.FileSystemObject")
For i= 0 To WScript.Arguments.Count -1
docPath = WScript.Arguments(i)
docPath = fso.GetAbsolutePathName(docPath)
If LCase(Right(docPath, 4)) = ".doc" Or LCase(Right(docPath, 5)) = ".docx" Then
Set objWord = CreateObject("Word.Application")
pdfPath = fso.GetParentFolderName(docPath) & "" & _
fso.GetBaseName(docpath) & ".pdf"
objWord.Visible = False
Set objDoc = objWord.documents.open(docPath)
objDoc.saveas pdfPath, 17
objDoc.Close
objWord.Quit
End If
Next
The text was updated successfully, but these errors were encountered: