And I think the main issue for is to send a mail with an attachment via LN.
#How to use microsoft save as pdf how to
MessageText:="The quote you requested has been attached to this message.", _Īs I understand, you know how to export the data you need to PDF. OutputFormat:=acFormatPDF, To:=Me.EmailAddress, Subject:="Quote", _ MsgBox "Please complete the e-mail address, then try again.", vbCriticalĭoCmd.SendObject ObjectType:=acSendReport, ObjectName:="QuoteReport", _ Let's say you have a field/text box EmailAddress and a command button cmdSendQuote on your form, and a report QuoteReport.Ĭode for the command button could look like this: Private Sub cmdSendQuote_Click()
#How to use microsoft save as pdf pdf
If DoCmd.SendObject works, you could send a report with the quote data in PDF format. If you use DoCmd.SendObject from Access, does it send through Lotus Notes automatically or do you get errors?
EditDocument method it returns the control to the user instead of creating within memory and you can see the prepared document, check it, manually change and finally send.Īndrey V Artemyev | Saint-Petersburg, Russia You create a variable which holds UIWorkspace object and when you call its. Wrk.EDITDOCUMENT True, MailDoc,, ,, True Set wrk = CreateObject("Notes.NotesUIWorkspace") PostedDate = Now() End With Set wrk = CreateObject("Notes.NotesUIWorkspace") wrk.EDITDOCUMENT True, MailDoc,, ,, True Set mailDb = Nothing Set MailDoc = Nothing Set objAttach = Nothing Set Session = Nothing Set EmbedAttachement = Nothing Set bodyRTI = Nothing Set wrk = NothingEnd Sub CREATERICHTEXTITEM("Attachment") Set EmbedAttachement = objAttach.EMBEDOBJECT(1454, "", Attachment, "Attachment") End If bodyRTI.APPENDTEXT vbCrLf & BodyText bodyRTI.Update. SAVEMESSAGEONSEND = SaveIt If Attachment "" Then Set objAttach =. However, it is still possible via Automation: Public Sub mailCreateShow(Subject$, Attachment$, Recipient$, CC$, bCC$, BodyText$, SaveIt As Boolean)Dim mailDb As Object, UserName$, MailDbName$, MailDoc As Object, objAttach As Object, _Session As Object, EmbedAttachement As Object, bodyRTI As Object, i%, wrk As Object Set Session = CreateObject("Notes.NotesSession") UserName = Session.UserName MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf" Set mailDb = Session.GETDATABASE("", MailDbName) If mailDb.IsOpen = False Then mailDb.OPENMAIL Set MailDoc = mailDb.CREATEDOCUMENT With MailDoc. But if you download it and manually rename to.
The only odd thing I notice is that this attachment has.
Do you have Lotus Notes opened while executing this code? It works fine for me with LN 8 (and it definitely did with LN 6).