Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-04-2014, 11:40 AM
frlan2a frlan2a is offline Prefilled email with information contained in a Word document Windows 7 64bit Prefilled email with information contained in a Word document Office 2010 64bit
Novice
Prefilled email with information contained in a Word document
 
Join Date: Sep 2014
Posts: 2
frlan2a is on a distinguished road
Default Prefilled email with information contained in a Word document

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

----------------------------------------
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prefilled email with information contained in a Word document Word VBA - Save file as a string contained within the word (always same row and leng) 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
Prefilled email with information contained in a Word document Repeating Information in Word Document without Forms or VBA? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 12:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft