Copy link to clipboard
Copied
I created a VSScript years ago that will print only the first page of multiple PDF files. You just drag the PDF's over the shortcut to the scrip and it works...
'//Print first page of pdfs
set WshShell = CreateObject ("Wscript.Shell")
set fs = CreateObject("Scripting.FileSystemObject")
Set objArgs = WScript.Arguments
if objArgs.Count < 1 then
msgbox("Please drag a file on the script")
WScript.quit
end if
Set gApp = CreateObject("AcroExch.App")
gApp.show '<- comment or take out to work in hidden mod
'open via Avdoc and print
for i=0 to objArgs.Count - 1
FileIn = ObjArgs(i)
Set AVDoc = CreateObject("AcroExch.AVDoc")
If AVDoc.Open(FileIn, "") Then
Set PDDoc = AVDoc.GetPDDoc()
Set JSO = PDDoc.GetJSObject
jso.print false, 0, 0, true
gApp.CloseAllDocs
end if
next
gApp.hide : gApp.exit : Quit()
MsgBox "Done!"
Sub Quit
Set JSO = Nothing : Set PDDoc = Nothing : Set gApp =Nothing : Wscript.quit
End SubThis script has worked through Windows 7, 10, 11 and multiple versions of Adobe Acrobat.
Now, the script will not work and it shows this:
Line 25 is this:
Set AVDoc = CreateObject("AcroExch.AVDoc")So here's the troubleshooting I've done so far before I focused on line 25:
So I am guessing it has something to do with recently updated versions of Acrobat...which is 2023.006.20320.
So, is this related to recent Adobe Acrobat updates and if so, is there another command to use to "call" Acrobat?
Copy link to clipboard
Copied
Does anyone know if AVDoc was removed/changed in the recent update?
Copy link to clipboard
Copied
Does it work correctly if I select and run "disable new acrobat" instead of the new UI?
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more