Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

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|improve this answer
    
That did it... thank you very much for your help!! –  Cheryl Mc Jun 8 '12 at 16:28
    
@CherylMc: You can upvote and accept people's answer to thank them. :) –  Tom Wijsman Jun 8 '12 at 16:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.