dspel79082
Board Regular
- Joined
- Sep 29, 2012
- Messages
- 125
Hello all, I am in need of one small snippet of code. I am using several of Ron Debruin's email routines to send emails from Excel through Outlook. No problems, but I have the need to insert a quick part from Outlook into the email that the code is composing.
The code has created the email, addressed it, filled in the subject and the greeting. While still working with the mailitem and before '.send' I need to insert a quick part from Outlook from NormalEmail template from category 'General'. The quick part name is 'Test'.
I've tried other approaches. It has to be a Quick Part, not a template or any other method.
Can anyone give me that one little line of code to insert the quick part into the email right after the body?
Here is the applicable part of the code:
<tbody>
</tbody><colgroup><col></colgroup>
The code has created the email, addressed it, filled in the subject and the greeting. While still working with the mailitem and before '.send' I need to insert a quick part from Outlook from NormalEmail template from category 'General'. The quick part name is 'Test'.
I've tried other approaches. It has to be a Quick Part, not a template or any other method.
Can anyone give me that one little line of code to insert the quick part into the email right after the body?
Here is the applicable part of the code:
With OutMail |
.To = cell.Value |
.cc = ccto |
.bcc = bccto |
.Subject = mysubject |
.Body = "Hello " & Cells(cell.Row, "D").Value & "," _ |
& vbNewLine & vbNewLine & _ |
Range("i1").Value _ |
& vbNewLine & Range("i2").Value & vbNewLine _ |
& vbNewLine & "Thank you," & vbNewLine & "My Name" & vbNewLine _ |
& "My Dept." & vbNewLine & "My Phone Number" |
& "My Dept." & vbNewLine & "My ext" |
.Attachments.Add ("N:\(Z) Shared Folders\" & cell.Offset(0, 1).Value) |
.send Thanks to anyone who cares to help. |
<tbody>
</tbody><colgroup><col></colgroup>