SendKeys problem

T

Tim

Hi folks,

I have Acrobat PDFWriter installed in my system. I used the following code
to print my reports in PDF format. When I ran the code, it produced the
first report with no problem. Then, it poped up a window and waited for the
response and the file name was not what I expected. Could anyone tell me
why? And how to fix it?

Thanks in advance.

Tim.

Public Sub x()

SendKeys "c:\temp\1.pdf" & "{ENTER}", False
DoCmd.OpenReport "1"

SendKeys "c:\temp\2.pdf" & "{ENTER}", False
DoCmd.OpenReport "2"

End Sub
 
D

Douglas J. Steele

The SendKeys method tends to be problematic at best, and should usually be
avoided.

As far as I'm aware, there are more reliable ways of setting the file name
with Acrobat PDFWriter, but unfortunately I don't know them, as I've never
used that product. It probably involves either Automation, or setting a
value in an INI file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top