Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro Button (2003)

    Hi,
    I would like to create a macro button in outlook to open a user template file (ie a standard email I often use). Can anyone please provide the VBA code to do this - outlook doesn't seem to have a 'record macro' function like MS Word'? I believe I can create the button by using the customise|macros|select-and-drag-onto-toolbar...let me know if I have got this wrong.

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Macro Button (2003)

    Would you be OK with setting it as a Shortcut? Cobbling together MaryJ's <post#=217640>post 217640</post#> and the last paragraph of <post#=376202>post 376202</post#>, you should be able to create an Outlook 2003 shortcut directly to the template file on drive, and open it from the Outlook Shortcut.

    See also <post#=298,905>post 298,905</post#>, this Crabby Office Lady tip, which should still work for office 2003, and <post#=308085>post 308085</post#>.
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Macro Button (2003)

    Repurposing some other code, the steps you would need in your macro are along these lines:

    <code>Sub MakeMessageFromTemplate()
    Dim msg As Outlook.MailItem
    Set msg = CreateItemFromTemplate("c:ExactPathToFile.oft")
    msg.Display
    Set msg = Nothing
    End Sub</code>

    Once the macro exists, you could do as you describe to make it accessible using a button.

  4. #4
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro Button (2003)

    Thanks guys - you have made my life a bit easier. I used the macro and it all worked a treat. I will try the shortcut method later in the week.

  5. #5
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro Button (2003)

    Hi there again. I work in two IT environments (Large Government Department, and a small firm). In both enviroments I have my email set up to autmatically generate my signature block when sending or replying to emails. In the government department, the macro works a treat and the email comes up with the signature block I included in the template, however in my firms email system I always have a signature block inserted at the top of my template generated email.

    Can you help me out with this problem...how do I automatically (in the macro code or email settings) stop a signature block being generated when using the template. My preference is to not disable this function 'permanently' in the tools-options menu.

  6. #6
    Lounger
    Join Date
    Mar 2001
    Location
    Los Angeles, California, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro Button (2003)

    Thanks for the sample code. I wanted to do the same thing as the original poster, and this subroutine was just what I needed. <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  7. #7
    Lounger
    Join Date
    Mar 2001
    Location
    Los Angeles, California, USA
    Posts
    31
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro Button (2003)

    Can you help me out with this problem...how do I automatically (in the macro code or email settings) stop a signature block being generated when using the template. My preference is to not disable this function 'permanently' in the tools-options menu.

    I'm interested in this, too. <img src=/S/help.gif border=0 alt=help width=23 height=15> I did some digging around on the web and found this (http://www.outlookcode.com/d/ol2003problems.htm#sp1), but the solution doesn't apply to emails generated from .OFT files. So, to raise the question again, if I have an email template that already includes a signature, how can I tell Outlook 2003 (SP2) not to generate a signature when creating an email from a template file? <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

    thanks much,

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Macro Button (2003)

    I don't personally have any information on this. I enter my signatures manually or by macro, or they already exist in the template I'm using. I never have used automatic signatures (from Outlook 97 forward).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •