Hi,
I am trying to print items from Outlook in a Citrix machine. I am printing the items into PDF files using ‘Microsoft Print to PDF option’. I am using OutlookEX.au3 for printing items.
Everything is working fine except handling the ‘Save Print Output As’ dialog appearing while trying to print the file to PDF.
I have set the default printer to ‘Microsoft Print to PDF’ from the control panel ( Control Panel\All Control Panel Items\Devices and Printers) and using the following method to print the item.
_OL_ItemPrint($oOutlook, $OL_Item) ;print item
I am not able to handle the ‘Save Print Output As’ dialog initiated by the print statement in the Citrix machine. The WinActive method always returns false. I have tried with ControlSetText, ControlClick and Send methods also.
Can anyone please help?
Func _SavePDF($sFilePath)
WinActivate ( "Save Print Output As", "")
WinWaitActive ( "Save Print Output As", "",5 )
If WinActive("Save Print Output As") Then
sleep(500)
Send($sFilePath)
sleep(500)
Send("{ENTER}")
sleep(500)
EndIf
EndFunc;=>_SavePDF