That led me to the tech database where I found this and it works for what I need to change the printer and print:
But how do I kill the acrobat session via code that is created??Run('rundll32.exe', 'printui.dll,PrintUIEntry /y /n "1 Side printer"')
;set working directory
pdfdir="c:\incoming\1 work\" ;needs trailing \
DirChange(pdfdir)
BoxOpen("PDF Print","")
;get list and count of pdf files.
pdflist=FileItemize("*.pdf")
pdfcount=ItemCount(pdflist,@tab)
;Get PDF printing command line
pcommand=RegQueryValue(@REGCLASSES,"AcroExch.Document\shell\print\command")
;set lower case for easier parsing
pcommand=strlower(pcommand)
;break it into exe and param section.
;find the /p
ptr=StrIndex(pcommand,"/p",0,@fwdscan)
;grab previous stuff
exepart=strsub(pcommand,1,ptr-1)
parampart=strsub(pcommand,ptr,-1)
;clean up exe part
exepart=strtrim(strreplace(exepart,'"',''))
for xx=1 to pdfcount
thispdf=ItemExtract(xx,pdflist,@tab)
BoxText(thispdf)
thisfullpdf=strcat(pdfdir,thispdf)
thisparams=StrReplace(parampart,"%%1",thisfullpdf)
Run(exepart,thisparams)
WinWaitExist("Print",30)
SendKey("~")
;Message(exepart,thisparams)
next
Message("All","Done")