Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Aug 2006
    Location
    Gtr London, England
    Posts
    256
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Run macro on sending new mail

    Hi,

    I new to Outlook macros and have limited experience with Word and Excel macros.

    I need to run an Outlook macro when sending a new mail. On hitting the send button I need the macro to look at the subject line and if it contains the word form1 then to attach form1 from the form1 folder on C: . If the subject line contains form2 then it needs to attach the form from the form2 folder on C: and so on up to form4.

    Id be grateful for any assistance that can be given.

    Many Thanks
    Lee

  2. #2
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Location
    Manning, South Carolina
    Posts
    9,433
    Thanks
    371
    Thanked 1,456 Times in 1,325 Posts
    Lee,

    I'm not very conversant in Outlook but if you google MS Outlook VBA Events the 1st several results will provide some very useful information. HTH
    May the Forces of good computing be with you!

    RG

    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

  3. #3
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,164
    Thanks
    47
    Thanked 976 Times in 906 Posts
    Adding macros to Outlook requires setting up for each user. I'd do the work outside Outlook with a program (vbs etc) you can place on the desktop - nice and easy to do automatically.

    cheers, Paul

  4. #4
    Administrator
    Join Date
    Jun 2010
    Location
    Portugal
    Posts
    12,519
    Thanks
    152
    Thanked 1,397 Times in 1,220 Posts
    I used to run Macros on certain conditions, mainly when certain messages arrived. Getting the macro to run is not really that hard, since it can be done through rules. To create the Macro, Outlook includes an editor, which is pretty easy to use, if you enable the Developer tab (I'm running Outlook 2013 and I think in 2010, it was also called the Developer Tab,but I am not sure what happened with 2007 and previous versions).

    I never worked with forms in Outlook, but I am sure there must be help available on the Net, for that. Good luck.
    Rui
    -------
    R4

  5. #5
    3 Star Lounger
    Join Date
    Aug 2006
    Location
    Gtr London, England
    Posts
    256
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Hi,

    Many Thanks to you all for your suggestions.

    Best Regards
    Lee

Posting Permissions

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