Paste From Clipboard to Open Email Object (1 Viewer)

BrianB75

Registered User.
Local time
Yesterday, 22:15
Joined
Aug 27, 2004
Messages
43
I am trying to copy the text from a Word doc created from a Report to the body of an e-mail that has been opened in VB. I was able to open the Word doc, select all the text and copy it but now I cannot figure out how to paste it into the body of the e-mail. Any help with this one?

Also, once I open the Word Doc, how can I get it to close "WINWORD.EXE"?

Please be kind with the code below...:eek:


Code:
    Set ol_app = New Outlook.Application
    Set email_item = Outlook.Application.CreateItem(olMailItem)
    Set word_output = New Word.Document
    
    DoCmd.OutputTo acOutputReport, "MUN_Update_Notice", acFormatRTF, "C:\MUN_Report.rtf"
      
    Documents.Open "C:\MUN_Report.rtf"
    With word_output
        Selection.wholestory
        Selection.Copy
    End With
    
    If Left(ol_app.Version, 2) = "10" Then email_item.BodyFormat = olFormatHTML
    
    email_item.To = em_to
    email_item.subject = "Manufacturer Update Notice"
    email_item.HTMLBody = Selection.Paste
 

Users who are viewing this thread

Top Bottom