# Outlook 2007+Macros



## Alanfd (Oct 3, 2008)

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?


----------



## Richard Schollar (Oct 4, 2008)

Hi Alan

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


```
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.


----------



## Alanfd (Oct 6, 2008)

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


----------



## Richard Schollar (Oct 6, 2008)

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?


----------



## Alanfd (Oct 6, 2008)

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.


----------



## Richard Schollar (Oct 6, 2008)

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?


----------



## Alanfd (Oct 6, 2008)

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.


----------



## Richard Schollar (Oct 6, 2008)

Oh I dodn't know that Alan.  Does it recognise any of the other Word versions as a potential email editor?


----------



## Alanfd (Oct 6, 2008)

No, MS developed or incorporated it's own editor, along with Outlook VBA.


----------



## Richard Schollar (Oct 6, 2008)

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?


----------



## Alanfd (Oct 3, 2008)

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?


----------



## Alanfd (Oct 6, 2008)

Yes, I have used "CONFIRM" as a signature on the Tool Bar and then Inserted "Date and Time" these were the extra key strokes I was talking about. I use this stamp on the original senders email to me, then return it to him so that he has this confirmation on his file.


----------

