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 / Reports / Printing / February 2005

Tip: Looking for answers? Try searching our database.

ACROBAT  SHORTCUT

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sammie - 24 Feb 2005 17:50 GMT
Is there a way to create a customized button on my toolbar to print my
report to Adobe Acrobat, and then automatically change the printer back
to my default printer?  I am not very familiar with macros in Access,
but I use Visual Basic all the time.  I have created a macro in Word to
do what I want, and assigned it to a button there.  Can I make a similar
macro work on my Access report, or is there another way?
Here is my VB code for the Word button:
Thanks
Sammie

Sub Acrobat()
'
' Acrobat Macro
' Macro recorded 2/23/2005 by Sammie
'
    ActivePrinter = "Adobe PDF"
    Application.PrintOut filename:="", Range:=wdPrintAllDocument, Item:= _
        wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
        ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
        False, PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=0, _
        PrintZoomPaperHeight:=0
    ActivePrinter = "hp LaserJet 1300 PCL 6"
End Sub
Ed - 25 Feb 2005 01:57 GMT
Hows this? create an identical report with its page property set to print to
acrobat printer. Then make a shortcut on the tool bar titled to print report
in acrobat or something so when the report opens its default is adobe. or
set the tool to direct print instead of previewing report. I use something
so when I print acrobat, before the report opens the macro copies the title
and report id to clipboard so when the acrobat dialog appears i just paste
the indo in the save as box.
> Is there a way to create a customized button on my toolbar to print my
> report to Adobe Acrobat, and then automatically change the printer back
[quoted text clipped - 29 lines]
> ----= East and West-Coast Server Farms - Total Privacy via Encryption
> =----
Sammie - 25 Feb 2005 21:14 GMT
> Hows this? create an identical report with its page property set to print to
> acrobat printer. Then make a shortcut on the tool bar titled to print report
[quoted text clipped - 37 lines]
>>----= East and West-Coast Server Farms - Total Privacy via Encryption
>>=----

I'm trying your suggestion.  In the On Page property of my report, I put
ActivePrinter = "Adobe PDF"
but it doesn't work.  Am I in the right place or do I have the wrong code?
How can I create a report ID?  I like your idea of automatically sending
a report ID to a clipboard.  How do I write the macro?
Thanks.  I'll look for your answer on Monday.
Sammie
Ed - 26 Feb 2005 02:04 GMT
Sammie: All done with macro. Dont know how to get the macro to you other
than making a sample database and exporting it to sample then email or post
for you. But the basics for a id would be to use a unique field that
pertains to the record of information your trying to print. I dont know what
your report is based on? and start print macro with: selecting the idfield -
copy - open reportpreview - when you hit print button it should bring up
acrobat dialog asking for a file name. Just right click in file name field
and paste the id. It creates a pdf file in the chosen folder with the name
as idfield. Then you can email or even fax the pdf file. I went through all
this because I fax (winfax) proposals to customers and winfax does not
include graphics from Access reports.

>> Hows this? create an identical report with its page property set to print
>> to acrobat printer. Then make a shortcut on the tool bar titled to print
[quoted text clipped - 53 lines]
> ----= East and West-Coast Server Farms - Total Privacy via Encryption
> =----
Sammie - 28 Feb 2005 15:36 GMT
> Sammie: All done with macro. Dont know how to get the macro to you other
> than making a sample database and exporting it to sample then email or post
[quoted text clipped - 65 lines]
>>----= East and West-Coast Server Farms - Total Privacy via Encryption
>>=----

Ed,

I'd appreciate your continued help with this.  First, I can't get my
Acrobat report to print. In the On Page property of my report, I put
ActivePrinter = "Adobe PDF"
but it doesn't work.  Am I in the right place or do I have the
wrong/insufficient code?

Second, if you could post a sample database with that macro either to
the newsgroup or to my email (whatever works) that'd be great.  I don't
have experience writing macros, and I haven't had any luck using help.
I'm not sure my hotmail will take the Access attachment.  So in that
case, maybe you can help me with the macro:

In trying to write the macro, I've got GoToControl and OpenReport
figured out.  I'm stuck on how to do the copy command.  It isn't on the
drop-down list of actions.

Thanks for the help.
Sammie
Mark Andrews - 25 Feb 2005 18:16 GMT
You could get the code to:
1. remember which printer is default, and switch the printer to the pdf
print driver
2. create a pdf file by printing the report to the driver using correct
registry settings.
3. switch the printer back to the default printer

We sell code for step 2.  code for steps 1 and 3 is available out there
somewhere for free
I don't remember the exact access website.  Email me at the rptsoftware
email if you can't find it
and you are interested in our product and I'll find the code for steps 1 and
3.

I did this exact same thing about 4 years ago, but was at a different job
and do not have the code anymore.

HTH,
Mark
RPT Software
http://www.rptsoftware.com

> Is there a way to create a customized button on my toolbar to print my
> report to Adobe Acrobat, and then automatically change the printer back
[quoted text clipped - 26 lines]
> http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
> ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Sammie - 25 Feb 2005 21:15 GMT
> You could get the code to:
> 1. remember which printer is default, and switch the printer to the pdf
[quoted text clipped - 59 lines]
>
> =----

I sent an email to your rptsoftware address - not sure if you received
it.  Please confirm.  I'd be interested in steps 1 - 3 - can't find this
code elsewhere.  I'll look for your reply on Monday.
Thanks.
Sammie
 
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.