Outlook 2007+Macros

Alanfd

Board Regular
Joined
Dec 16, 2002
Messages
67
Recently I upgraded to Outlook 2007, and found a problem. Outlook 2007 has it's own VBA. I had a macro that I created in Word 2003 and used in Outlook 2003, now the new version won't recognize that macro.

Would this be the site where I could past the old macro and get some help to make it work in Outlook 2007. It's a simple macro that effectively places a word "Confirmed" and a date and time stamp on an email that I would reply to?
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Hi Alan

Sure, go ahead and post it. I suspect you have in the 2003 line a Dim statement along the lines of

Code:
Dim obj As Outlook.MAPIFolder
That could be the source of your problem. But go ahead and post and we will do our best to help you diagnose.
 
Last edited:
Upvote 0
Thank you, here is the macro. I did find an alternative but, it involves more key strokes and defeats the object of the convenience of a macro.

Thank you in advance for your help.



Sub Confirmed1()
'
' Confirmed1 Macro
' Macro recorded 7/13/2006 by l39cns
'
Selection.Font.Name = "Verdana"
Selection.Font.Size = 22
Selection.Font.Color = wdColorBlue
Selection.Font.Bold = wdToggle
Selection.TypeText Text:="CONFIRMED"
Selection.TypeParagraph
Selection.InsertDateTime DateTimeFormat:="M/d/yyyy H:mm ", _
InsertAsField:=False, DateLanguage:=wdEnglishUS, CalendarType:= _
wdCalendarWestern, InsertAsFullWidth:=False
Selection.TypeParagraph
Selection.TypeParagraph
Selection.Font.Size = 10
Selection.TypeText Text:= _
"Note: Files submitted after 15:00 will be processed the foll"
Selection.TypeText Text:="owing working day."
Selection.TypeParagraph
ActiveDocument.PrintOut
End Sub
 
Upvote 0
So this was originally recorded in Word2003 but you were able to use it in Outlook2003 too? Was this because you used Word as your email editor in Outlook2003?
 
Upvote 0
Yes, I'm not a VB wiz and I took advantage of using MS Word 2003 to record the macro. It worked very well in Outlook 2003. I would still like to use the same format for business purposes in Outlook 2007. I was hoping MS would have made it just as easy to record a macro in Outlook 2007.
 
Upvote 0
I am afraid I don't have access to the office2007 applications at the moment (I have them at home though so can investigate tonight). Are you still using Word (presumably 2007 version) as your email editor?
 
Upvote 0
We do not have that on our machines yet, they, the Company will install it next week. I do use MS 2007 at home though. The problem is Outlook 2007 does not recognize Word 2007 as an editor.
 
Upvote 0
The code you posted definitely won't work in Outlook as VBA as it uses Word enumerations and objects/methods of the Word object model. I am fairly unfamiliar with Outlook2007 but is there no way for you to set up some kind of template to use for outgoing emails?
 
Upvote 0

Forum statistics

Threads
1,216,175
Messages
6,129,311
Members
449,499
Latest member
HockeyBoi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top