VBA code to insert custom signature in Outlook 2007 email

5,987

Instead of wiring up macros, perhaps check out Outlook 2007's Quick Parts.

The Microsoft Office Outlook 2007 Quick Parts feature provides building blocks, reusable pieces of content or other e-mail message parts that are stored in galleries. You can access and reuse the building blocks at any time. You can also save building blocks and distribute them with templates so that other users can use the building blocks you created.

Create a reusable building block:

  1. Select the content or e-mail message part that you want to store as a reusable building block.
  2. On the Insert tab, in the Text group, click Quick Parts.
  3. Click Save Selection to Gallery Name Gallery.
  4. Fill out the information in the Create New Building Block dialog box.

You can insert a Quick Part by selecting it form the Ribbon, or start typing the Quick Part name and hit F3.

Share:
5,987

Related videos on Youtube

Dave E
Author by

Dave E

Updated on September 18, 2022

Comments

  • Dave E
    Dave E almost 2 years

    I need to insert a specific signature into an email message. Our support team uses a variety of different signatures to respond to different types of support needs. Currently, I access them via the menu: Insert > Signature > "Ticket Assigned - AppSup"

    I would like to streamline that process by using a macro instead (I can then create toolbar items for macros to call specific signatures). So, for example, I need VBA code to insert the "Ticket Assigned - AppSup" signature.

  • Dave E
    Dave E almost 13 years
    Quick Parts are not...ah..."quick." You still have to go to the Insert menu, select Quick Parts, and then if you have a lot of Quick Parts (as we would since we have a lot of different signatures), you would have to scroll to the quick part you want to select it. I would need a macro again to be assigned to a specific Quick Part that I could then link to a specific toolbar button. I'm looking for one-click insertion here of my most frequently used macros. Thanks!
  • Ƭᴇcʜιᴇ007
    Ƭᴇcʜιᴇ007 almost 13 years
    @Dave E: "...or start typing the Quick Part name and hit F3" That's pretty quick :) For example, I have a Quick Part named "To help ensure". In my Outlook message I type "to" and hit F3 and it replaces the "to" with the text from the Quick Part.
  • Dave E
    Dave E almost 13 years
    OOPS! "of my most frequently used signatures."
  • Ƭᴇcʜιᴇ007
    Ƭᴇcʜιᴇ007 almost 13 years
    @Dave E - I'll add another answer that is specific to macros.
  • Dave E
    Dave E almost 13 years
    These are formatted (bold, underline, etc.) signatures that may contain hyperlinks. Would prfer to use the insert signature by VB. Thanks! :D
  • Dave E
    Dave E almost 13 years
    While the above is quite helpful its still not what I'm hoping for. I need a macro to insert one of the signatures that I have already defined (e.g., "Ticket Assigned - AppSup"). My created signatuers already have the formatting and hyperlinks that are needed for various reclipients. I don't need to re-write all of them, I just need to insert the one's that I have. Normally, this is done via menu items (Insert > Signature > "Ticket Assigned - AppSup"). I want a macro to do just that. I'll put a button for it on the tool bar and it will be one-click to insert the macro I had to scroll for.
  • Ƭᴇcʜιᴇ007
    Ƭᴇcʜιᴇ007 almost 13 years
    The problem is that there is no exposed Signature object; so the only way to insert existing signatures is by importing the .RTF files that are in the user's application data folder. So at a minimum all the signatures would need to be named the same on each computer for each user (unless you want a different macro for each user).
  • Dave E
    Dave E almost 13 years
    Yep, they are all named the same among all our team. We use the same dozen signature files - having each copied the same set onto our PC's Sinature folder (C:\Documents and Settings\<LAN ID>\Application Data\Microsoft\Signatures). But there are really only 4 that we use routinely all the time. So, I want to put four buttons on my toolbar, one for each. I can use the same code, but copy it four times to create a macro for each of the major hitters :D