I see a lot of items that are helping with sending a new mail with attachment. And it works very well.
But now I like to add a pdf as attachment to every reply or forward I do. Not the ataachments that are in the original mail but a new own attachment. Is there anybody who can help me with this?
The code I use for sending a new mail with attachment is:
Const AttFile As String = "C:\pathnamedoc.pdf"
Dim olApp As Outlook.Application
Dim Msg As Outlook.MailItem
Set olApp = Outlook.Application
Set Msg = olApp.CreateItem(olMailItem)
I found already a solution for adding my pdf when I reply. Stays open: adding my pdf when I forward. Any tips? thank you.
the code I used:
' 2006 January 17 AAW - Written
' ReplyAll to open email requesting sender complete and return the attached SQC file
Dim objOutlook As Outlook.Application
Dim atts As Outlook.Attachments
Dim newAttachement As Outlook.Attachments
Dim objMail As Outlook.MailItem
Dim objItem As Object
Dim strAddress As String
Dim strName As String
Dim strEntryID As String
Dim strMessage As String
strMessage = "Please complete and return the attached SCQ Form." & vbCrLf & vbCrLf & "Thank You."
Set objOutlook = CreateObject("Outlook.Application")
Set objItem = objOutlook.ActiveInspector.CurrentItem
Set objMail = objItem.ReplyAll