Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / January 2006

Tip: Looking for answers? Try searching our database.

SendKeys problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim - 06 Jan 2006 22:17 GMT
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  
Douglas J. Steele - 06 Jan 2006 22:46 GMT
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.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

> Hi folks,
>
[quoted text clipped - 19 lines]
>
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.