![]() |
#1
|
|||
|
|||
![]()
Hi,
Would anyone be able to help me with this one ? I want to create Macro that would be linked to a button and that will be used to send an email with some information that are contained in a word document. I essentially want to prefill the email adresses, subject and body of the email. The main difficulty is that the body of the email is a table of variable row in the word document. I was trying to put the information required in formfeilds in the word document, but I don't know if this is the best way to go. If anyone has any advice or ideas please let me know ! Thanks a lot for your help. ---------------------------------------- Private Sub SendEmail_Click() Dim OL As Object Dim EmailItem As Object Dim Doc As Document Set OL = CreateObject("Outlook.Application") Set EmailItem = OL.CreateItem(olMailItem) Set Doc = ActiveDocument Doc.Save With EmailItem .Subject = "Disposition of AIDC Destructive Tests" .Body = "Email Information" & vbCrLf & _ " Table form the word document here " .To = "Addresses Contained in the Word Document" .Importance = olImportanceNormal .Attachments.Add Doc.FullName End With EmailItem.SendMail Set Doc = Nothing Set OL = Nothing Set EmailItem = Nothing End Sub ---------------------------------------- |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
RG87 | Word VBA | 1 | 05-21-2014 05:39 AM |
Word delete page if string is not contained | wolfking333 | Word VBA | 0 | 06-23-2013 10:02 AM |
![]() |
Bill Bisco | Word | 6 | 09-03-2012 07:59 PM |
How to disable email information in top of email | snahtter | Outlook | 0 | 05-05-2012 03:57 AM |
Merging a Word doc with VB functions contained | adamwbrown | Word | 0 | 08-13-2008 06:10 AM |