Create macros in Outlook 2007

Status
Not open for further replies.
C

cte67

The site
http://turtleflock-ol2007.spaces.live.com/blog/cns!C1013F1F9A99E3D8!579.entry
gives a nice clear description of how to create a macro in Outlook 2007.
What I tried is:

Sub Blue()
Dim objDoc As Word.Document
Dim objSelection As Word.Selection
On Error Resume Next
Set objDoc = Application.ActiveInspector.WordEditor
Set objSelection = objDoc.Windows(1).Selection
objSelection.Font.Color = wdColorBlue
Set objSelection = Nothing
Set objDoc = Nothing
End Sub

Unfortunately, this does not work. I am using Outlook 2007, and have the
latest updates (12.0.6504.5000) SP2 MSO (12.0.6425.1000) ... am running
WinXP, Service Pack 3.
 

Brian Tillman

Senior Member
"cte67" <cte67> wrote in message
news:FCAB3B05-91C8-4E61-AEB0-D4FF593E3156@microsoft.com...

> The site
> http://turtleflock-ol2007.spaces.live.com/blog/cns!C1013F1F9A99E3D8!579.entry
> gives a nice clear description of how to create a macro in Outlook 2007.
> What I tried is:
>
> Sub Blue()
> Dim objDoc As Word.Document
> Dim objSelection As Word.Selection
> On Error Resume Next
> Set objDoc = Application.ActiveInspector.WordEditor
> Set objSelection = objDoc.Windows(1).Selection
> objSelection.Font.Color = wdColorBlue
> Set objSelection = Nothing
> Set objDoc = Nothing
> End Sub
>
> Unfortunately, this does not work. I am using Outlook 2007, and have the
> latest updates (12.0.6504.5000) SP2 MSO (12.0.6425.1000) ... am running
> WinXP, Service Pack 3.


microsoft.public.outlook.program_vba is a better newsgroup for programming
questions.

 
C

cte67

I tried going to microsoft.public.outlook.program_vba ... appears to be an
invalid adr.

"Brian Tillman " wrote:

> microsoft.public.outlook.program_vba is a better newsgroup for programming
> questions.
> >


 
C

cte67

I found it.

"Brian Tillman " wrote:
> microsoft.public.outlook.program_vba is a better newsgroup for programming
> questions.
> >


 
Status
Not open for further replies.

Similar threads

Top