![]() |
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 understand that it is essentially impossible to add buttons, etc to
the msoCommandBar in the Envelope object of an Outlook Inspector when Word is being used as the editor. What I need to do is simply determine if one of these buttons is in the "down" state or selected. It seems that I cannot access the buttons in the Envelope as I would normally with the FindControlObj() method. I have searched the Inspector object and the MailItem and I cannot find where this attribute is stored. So, the question basically boils down to: Is it possible to determine if a MailItem has the "Digitally Sign" button checked when using WordMail. I have no problem doing this when not using WordMail. I just read the ButtonState of that particular button in the MailItem.Send event and determine it is pressed. It is easy because in the non-WordMail Inspector, the button is located in the Standard toolbar. I can't seem to find a property of an Inspector or MailItem that represents if Digitally Sign is selected. Thanks |
#2
|
|||
|
|||
![]()
I failed to specify my development environment. I am writing VSTO
addins for Office 2003/2007 using C# and VB. I have tried OutlookSpy, Spy++, Procmon, etc, etc, to try and find any trace of where the Inspector or MailItem store the fact of whether "Digitally Sign" has been selected when WordMail is being used. Thanks |
#3
|
|||
|
|||
![]()
Since both of your questions relate to the same thing I'm answering here.
Also, please include part of the preceding thread so people know what you're talking about. You can see if what you want can be done by iterating the CommandBars collection of the Word Document object represented by the WordEditor object of the Inspector and digging down to where that control is located, then reading the State property of the control. If that doesn't work then it cannot be done. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm wrote in message ... I failed to specify my development environment. I am writing VSTO addins for Office 2003/2007 using C# and VB. I have tried OutlookSpy, Spy++, Procmon, etc, etc, to try and find any trace of where the Inspector or MailItem store the fact of whether "Digitally Sign" has been selected when WordMail is being used. Thanks |
#4
|
|||
|
|||
![]()
Ken,
Thanks, I had hoped that wasn't going to be it. I have tried numerous times to enumerate the built in command bars of the envelope in WordMail but I have been unable to access them. I only get back the Mainmenu bar, not the "Standard" bar. I have no problem getting all of the other toolbars, just not Standard. Do you know of a method to just read the built-in command bar from the Envelope when WordMail is the editor? I was hoping that there was a property buried somewhere, like Importance, that captured the need for the MailItem to be digitally signed. It would seem that since the email is not signed until after the MailItem's Send event fires, then there must be some attribute on the MailItem that tells Outlook to sign it. Let's look at it from the other point of view: if within Outlook I wanted to programmatically create an email (MailItem) from scratch and tell Outlook to Digitally Sign it before it is sent, what would I need to do? Is there a flag or method built into the MailItem or Inspector that lets Outlook know to sign the message before it is sent? I have tried OutlookSpy and code like the following to get the built- in toolbar, but no luck. Dim word = CType(Me.Inspector.WordEditor, Word.Document) For Each i As CommandBar In word.CommandBars For Each c As CommandBarControl In i.Controls 'check the control name, caption etc. I have also tried monitoring the PropertyChanged and CustomPropertyChanged events but they don't pickup when you change the state of the button. I appreciate the help. |
#5
|
|||
|
|||
![]()
I know of no way to access anything much in the Envelope object. Some MAPI
property being changed or set if the button is depressed might not be true unless the item is saved. I'd think then the MessageClass would be changed, but I don't work with signed messages very often. It's possible that MS has internal ways to get at that information that aren't exposed to the outside world, just like certain CommandBarControls can't be used by outside code. If it's not exposed in the controls listed in OutlookSpy then it's inaccessible. In a true Outlook item I'd read the button State from the Standard toolbar. Since the toolbar is provided by Office changes to CommandBar controls don't set any Outlook properties natively. That would have to be coded using control events. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm wrote in message ... Ken, Thanks, I had hoped that wasn't going to be it. I have tried numerous times to enumerate the built in command bars of the envelope in WordMail but I have been unable to access them. I only get back the Mainmenu bar, not the "Standard" bar. I have no problem getting all of the other toolbars, just not Standard. Do you know of a method to just read the built-in command bar from the Envelope when WordMail is the editor? I was hoping that there was a property buried somewhere, like Importance, that captured the need for the MailItem to be digitally signed. It would seem that since the email is not signed until after the MailItem's Send event fires, then there must be some attribute on the MailItem that tells Outlook to sign it. Let's look at it from the other point of view: if within Outlook I wanted to programmatically create an email (MailItem) from scratch and tell Outlook to Digitally Sign it before it is sent, what would I need to do? Is there a flag or method built into the MailItem or Inspector that lets Outlook know to sign the message before it is sent? I have tried OutlookSpy and code like the following to get the built- in toolbar, but no luck. Dim word = CType(Me.Inspector.WordEditor, Word.Document) For Each i As CommandBar In word.CommandBars For Each c As CommandBarControl In i.Controls 'check the control name, caption etc. I have also tried monitoring the PropertyChanged and CustomPropertyChanged events but they don't pickup when you change the state of the button. I appreciate the help. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
digitally sign menu option | RipperT[_2_] | Outlook Express | 3 | December 11th 07 02:47 AM |
Determining the account of an email | Sean Farrar (Intechrity) | Outlook and VBA | 5 | March 29th 07 02:38 PM |
Hash sign instead of pound sign! | Nel | Outlook Express | 3 | February 3rd 07 07:35 PM |
determining Senders smtp address | Paul Young | Outlook and VBA | 4 | November 2nd 06 05:18 PM |
Determining account being used | Scott | Outlook and VBA | 2 | January 25th 06 04:39 PM |