Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need a basic VB macro 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 a VB macro to insert the "Ticket Assigned - AppSup" signature.

share|improve this question
    
check this link. might help you to construct a macro that inserts signature: rondebruin.nl/mail/folder3/signature.htm –  tumchaaditya Jul 10 '12 at 6:50

2 Answers 2

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|improve this answer
    
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! –  Dave E Aug 10 '11 at 15:27
    
@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. –  Ƭᴇcʜιᴇ007 Aug 10 '11 at 15:30
    
OOPS! "of my most frequently used signatures." –  Dave E Aug 10 '11 at 15:34
    
@Dave E - I'll add another answer that is specific to macros. –  Ƭᴇcʜιᴇ007 Aug 10 '11 at 15:50

If you want to use macros instead of Quick Parts, here's some info to get you going.

An example VBA function to insert text intot eh current edit window of Outlook:

Public Sub MySig1()
  Set objDoc = Application.ActiveInspector.WordEditor
  Set objSel = objDoc.Windows(1).Selection
  objSel.TypeText Text:=vbCrLf & "Joe Blow" & vbCrLf & "A Company Name" & vbCrLf & "(888)765-4321"
End Sub

This will insert:

<blank line>
Joe Blow
A Company Name
(888)765-4321

You can add a button for the marco(s) to the Quick Access Toolbar in Outlook:

  1. Open the item window for which you’d like to add the macro button to.
  2. Click the little down arrow on the right side of the QAT and choose More Commands… or Click on the Office logo in the left top, choose Editor Options and select the Customize section.
  3. In the drop down list “Choose commands from” select: Macros. (The list below will now show you all your macros.)
  4. Select the macro that you wish to create a button for and press the Add >> button.
  5. To modify the name and icon press the Modify… button.
  6. Close the Editor Options dialog to return to your item window and use your button.
share|improve this answer
    
These are formatted (bold, underline, etc.) signatures that may contain hyperlinks. Would prfer to use the insert signature by VB. Thanks! :D –  Dave E Aug 10 '11 at 17:26
    
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. –  Dave E Aug 12 '11 at 13:57
    
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). –  Ƭᴇcʜιᴇ007 Aug 12 '11 at 14:23
    
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 –  Dave E Aug 12 '11 at 15:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.