Create a macro in Outlook 2010 to add a simple line of text to the email body

9,006

If you look at this link you'll see that it's part of Namespace: Microsoft.Office.Interop.Word, which is specific to Word.

So, in Outlook you first need to get access to the Word Editor; so:

Set objDoc = Application.ActiveInspector.WordEditor 
Set objSel = objDoc.Windows(1).Selection 
objSel.TypeText Text:="Thank you for the quote." 
Share:
9,006

Related videos on Youtube

Cheryl Mc
Author by

Cheryl Mc

Updated on September 18, 2022

Comments

  • Cheryl Mc
    Cheryl Mc almost 2 years

    I created this macro in MS Word and it works great but it doesn't work when I copied it into an Outlook 2010 macro. any assistance is appreciated.

    Sub Thanks1()
    '
    ' Thanks1 Macro
    '
    '
        Selection.TypeText Text:="Thank you for the quote."
    End Sub
    
  • Cheryl Mc
    Cheryl Mc about 12 years
    That did it... thank you very much for your help!!