I am trying to interact with an external Acrobat dialog window through VBA.
I am using MapPoint to generate maps and then save them as PDF files. Everything is controlled through VBA. I am using the "PrintOut" method of the maps to save them.
objApp.ActiveMap.PrintOut _
Title:=PDFTitle, _
PrintArea:=geoPrintFullPage, _
PrintQuality:=geoPrintQualityNormal, _
PrintOrientation:=geoPrintLandscape
Using this command in this way launches a "Save PDF file as" dialog box. At some point in the past we used to deal with this issue by using the SendKeys function to send {Enter} to the dialog and close it, but this no longer works.
I think the problem is that running this command causes VBA execution to stop until the dialog box is closed. Is there any way I could schedule a Sendkeys function to execute after the dialog opens? Or is there a way to prevent VBA execution from pausing?
Ideally, I would like to avoid having the dialog box in the first place, but that does not appear to be possible with my current setup. Specifying the OutputFileName when running the command does prevent the dialog from appearing, but it causes some kind of problem with the saved file (it can't be opened and appears to be corrupt).
Any suggestions are appreciated!