![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I've been using John's code but for some reason it sometimes inserts the
wrong signature. I'm wondering if it's the Item("name of signature") that's causing problems. "hughess7" wrote: Thanks guys... "Sue Mosher [MVP-Outlook]" wrote: Note that this technique works only if Word is not the email editor. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "John Strung" wrote in message ... Sue, I have some code that does something similar. You might try adapting this. It depends on everyone having their signature file in Outlook (In Tools:Options:Mail Format) named "Default Signature". If it is names something else, change the corresponding line below: ---------------------------------- 'The next section inserts the default signature file Dim objOutlook As Outlook.Application Dim ObjCtl As Office.CommandBarControl Dim ObjPop As Office.commandBarPopup Dim ObjCB As Office.CommandBar Dim ObjItem As Object Set objOutlook = CreateObject("Outlook.Application") Set ObjCB = objOutlook.ActiveInspector.CommandBars("Menu Bar") Set ObjPop = ObjCB.Controls("Insert") Set ObjPop = ObjPop.Controls("Signature") Set ObjCtl = ObjPop.Controls.Item("Default Signature") 'Assumes user's signature file is named Default Signature ObjCtl.Execute Set objOutlook = Nothing Set ObjCtl = Nothing Set ObjPop = Nothing Set ObjCB = Nothing Set ObjItem = Nothing |
#2
|
|||
|
|||
![]()
I've just found a work-around. It's clearly some kind of refresh issue as
occasionally the code works fine but other times merrily moves down the list of different signatures. In the absence of a refresh/requery method for CommandBarPopups the Reset method seems to do the job (as long as you're haven't customised this part of the menu!) - I've inserted it after the line that sets the popup and before the line that sets the control: .... Set ObjPop = ObjPop.Controls("Signature") ObjPop.Reset Set ObjCtl = ObjPop.Controls.Item("name of signature") .... "Martin" wrote: I've been using John's code but for some reason it sometimes inserts the wrong signature. I'm wondering if it's the Item("name of signature") that's causing problems. "hughess7" wrote: Thanks guys... "Sue Mosher [MVP-Outlook]" wrote: Note that this technique works only if Word is not the email editor. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "John Strung" wrote in message ... Sue, I have some code that does something similar. You might try adapting this. It depends on everyone having their signature file in Outlook (In Tools:Options:Mail Format) named "Default Signature". If it is names something else, change the corresponding line below: ---------------------------------- 'The next section inserts the default signature file Dim objOutlook As Outlook.Application Dim ObjCtl As Office.CommandBarControl Dim ObjPop As Office.commandBarPopup Dim ObjCB As Office.CommandBar Dim ObjItem As Object Set objOutlook = CreateObject("Outlook.Application") Set ObjCB = objOutlook.ActiveInspector.CommandBars("Menu Bar") Set ObjPop = ObjCB.Controls("Insert") Set ObjPop = ObjPop.Controls("Signature") Set ObjCtl = ObjPop.Controls.Item("Default Signature") 'Assumes user's signature file is named Default Signature ObjCtl.Execute Set objOutlook = Nothing Set ObjCtl = Nothing Set ObjPop = Nothing Set ObjCB = Nothing Set ObjItem = Nothing |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
What happened to my "Insert Signature" option? | Rita Perdue | Outlook - Installation | 8 | March 6th 09 04:34 PM |
Outlook 2003 sends signature img as attachment | Om Audio | Outlook - General Queries | 0 | February 16th 06 08:49 PM |
Overtype instead of insert | B.W. | Outlook Express | 3 | January 22nd 06 03:56 AM |
Why can't outlook 2003 access specified folder location for calend | morrocos | Outlook - Calandaring | 0 | January 10th 06 02:41 PM |
Access 2000 onto Office 2003 computer | BenFranklin | Outlook - Installation | 1 | January 9th 06 10:36 PM |