aarongaria said:
I guess I didn't give enough initial info..
I am using Access 07, I have the option to Save as PDF for a report when
using the full version of access, but when deployed in runtime that option
is
not available. Want to be able to have the client using the runtime
version
to save a report as a PDF so it can then be emailed to another office. Is
there a way to do this, thanks in advance for any help.
The link to the PDF control posted in reply seems to apply only to Access
03
and earlier.
Well, you can use Stephens code with 2007, but 2007 DOES have pdf support
built in as long as they installed office sp2.
Any download of the newer runtime has sp2 built in already.
Anyway, now that we know you are using 2007, you can use the built-in pdf,
you just have to create a ribbon and specify it for all of your reports.
In that custom ribbon you can include the built-in pdf ability. You don't
need any 3rd party tools or software anymore....
The report ribbon I use with a pdf "save as" and email on it is:
<customUI xmlns="
http://schemas.microsoft.com/office/2006/01/customui">
<ribbon startFromScratch="true">
<tabs>
<tab id="MyReport" label="Report Print and View Options">
<group idMso="GroupPrintPreviewPrintAccess" />
<group idMso="GroupPageLayoutAccess" />
<group idMso="GroupZoom" />
<group idMso="GroupPrintPreviewClosePreview" />
<group id="ListCommands" label="Print">
<button idMso="FilePrintQuick" keytip="q" size="large"/>
<button idMso="PrintDialogAccess" label="Print Dialog"
keytip="d" size="large"/>
</group>
<group id="ExportCmds" keytip="e" label="Save As">
<button idMso="PublishToPdfOrEdoc" keytip="p" size="large"/>
<button idMso="ExportHtmlDocument" keytip="h" size="large"/>
<button id="CreateEmail" label="Email Report"
imageMso="FileSendAsAttachment"
enabled="true" size="large"
onAction= "=MySend()"/>
</group>
<group idMso="GroupZoom"></group>
<group id="Exit" keytip="x" label="Exit">
<button idMso="PrintPreviewClose" keytip="c" size="large"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
I also use a public function for the mail as pdf, just place the follwing in
a standard code module:
Public Function MySend()
DoCmd.SendObject acSendReport, Screen.ActiveReport.Name, acFormatPDF
End Function
There might be a way to get/use the built in email, but I am in a
hurry...and I not found the option. However, the above is only one extra
line of VBA code to make this work anyway...