![]() |
|
#1
|
||||
|
||||
![]() Hi Aonzo, You might find the discussion here useful: http://www.vbaexpress.com/forum/showthread.php?t=20158
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]()
thanks, i found some new code that did the job.
Please find below, in case someone was interested. Code:
Sub FillOutlookBody() ActiveDocument.Content.Copy Dim objOutlook As Outlook.Application Dim objOutlookMsg As Outlook.MailItem Dim objInspector As Outlook.Inspector Dim objDoc As Word.Document Set objOutlook = CreateObject("Outlook.Application") Set objOutlookMsg = objOutlook.CreateItem(olMailItem) With objOutlookMsg 'Set the recipient for the new email .To = "fake@email.com" 'Set the recipient for a copy .CC = "fake@email.com" 'Set the subject .Subject = "subject" 'The content of the document is used as the body for the email .Body = ActiveDocument.Content .Display End With Set objInspector = objOutlook.ActiveInspector If Not objInspector Is Nothing And objInspector.EditorType = olEditorWord Then Set objDoc = objInspector.WordEditor objDoc.Range.Paste End If Set objDoc = Nothing Set objOutlookMsg = Nothing Set objInspector = Nothing Set objOutlook = Nothing End Sub |
![]() |
Tags |
format, outlook 2010, word 2010 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
Abbottking | Outlook | 2 | 10-03-2011 08:44 AM |
Word document has outlook send message fields at top | yancyxc | Word | 0 | 06-21-2011 08:55 AM |
![]() |
ruggb | Outlook | 1 | 10-20-2010 12:29 PM |
Outlook sending multiple emails | Shawn76 | Outlook | 0 | 08-07-2010 09:10 AM |
![]() |
vijayaram | Word | 1 | 12-30-2009 08:25 AM |