add pdf to every reply or forward

Kurt

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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:
Sub Attach()
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)
With Msg
.Attachments.Add AttFile
.Display
End With
End Sub

Thanks in advance.
Kind regards
Kurt
 

Kurt

New Member
Outlook version
Outlook 2010 32 bit
Email Account
Exchange Server
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:
Sub Reply2AllSCQ()

' 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

CopyBody = objMail.Body
objMail.Body = vbCrLf & strMessage & vbCrLf & vbCrLf & CopyBody
Set newAttachments = objMail.Attachments
newAttachments.Add "C:SCQ.doc", _
olByValue, 1, "SCQ Questionnaire"
objMail.Display

End Sub
 

Top