[mso] Access 2002: Print Report To PDF, Email As Attachment

  • From: Cathy.Evans@xxxxxxxxx
  • To: mso@xxxxxxxxxxxxx
  • Date: Mon, 23 May 2005 22:21:38 -0400

Hello . . . have been chasing and researching and testing and rewriting and
testing some more for almost two weeks on how to set up code that will
automatically print a report to pdf format, then attach it to an email list
based on a list box selection.  Have set up ghostprinters, downloaded
almost every version of a pdf writer per whatever was recommended in my
research, and already had Adobe Pro 6.0 installed.  Have gotten close, but
most of the samples are for using Outlook or Outlook Express, we're using
Notes.  I can automatically send the report as a snapshot format to my
list, but most of the recipients do not have the snapshot viewer and for
many reasons, I'm unable to send them the url and tell them to install it.

Before I continue going in circles, has anyone been able to overcome the
obstacles or have any input or leads to websites that may have a solution?

This is the code I'm using which would be great if utilizing snapshot
format was allowable.  But can't so next plan was to alter to first print
the report to pdf in a set file location, then automatically attach from
that same location.  Two list boxes on form, one allows user to select
which report, the other is the email addresses of team, allowing selection
of one or multiple recipients.

I feel like I've run into a brick wall on this and seem to find solutions
that handle one of the aspects, but not everything, or handle it but not
for Lotus Notes.

Any help would be appreciated, thank you so much, Cathy

Private Sub cmdEmail_Click()

    Dim strDocName As String
    Dim strEmail As String
    Dim strMailSubject As String
    Dim strMsg As String
    Dim strTemp As String
    Dim lngResult As Long

    strDocName = Me.lstRpt
    strEmail = Me.txtSelected & vbNullString
    strMailSubject = Me.txtMailSubject & vbNullString
    strMsg = Me.txtMsg & vbNullString & vbCrLf & vbCrLf & "Jane Doe" & _
        vbCrLf & "MailTo:jane.doe@xxxxxxxxx";

    DoCmd.SendObject objecttype:=acSendReport, _
        ObjectName:=strDocName, outputformat:=acFormatSNP, _
        To:=strEmail, Subject:=strMailSubject, MessageText:=strMsg

End Sub



-----------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person
or entity to which it is addressed and may contain proprietary,  
business-confidential and/or privileged material.
If you are not the intended recipient of this message you 
are hereby notified that any use, review, retransmission, 
dissemination, distribution, reproduction or any action taken
in reliance upon this message is prohibited. If you received
this in error, please contact the sender and delete the 
material from any computer.  Any views expressed in this message
are those of the individual sender and may not necessarily reflect 
the views of the company.  
-------------------------------------------------------------------------------------------------------

*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx with the word "unsubscribe" (without the quotes) in 
the subject line.

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts:

  • » [mso] Access 2002: Print Report To PDF, Email As Attachment