A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

hooking the insert-File menu command (add attachment) in outlook 2003 (c# add in)



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7  
Old January 3rd 07, 08:17 AM posted to microsoft.public.outlook.program_vba
semedao
external usenet poster
 
Posts: 13
Default hooking the insert-File menu command (add attachment) in outlook 2003 (c# add in)

sorry but I didn't understand "The "Envelope" toolbar exposes
a single control that contains everything else" , ok , it's not a
commandbarbutton , but there is no any other way to access it?
or if there is not some api , maybe by windows hooking ?
"Dmitry Streblechenko" wrote in message
...
Because it is broken :-) ?
The attachment icon in the Word editor is not a real CommandBarButton
conrol - you cannot access any buttons there. The "Envelope" toolbar
exposes a single control that contains everything else.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"semedao" wrote in message
...
thanks , now the next problem is that I used findcontrol/s and register
to the click event
when choose from insert-file or from the toolbar clicking on the down
arrow near the attachment and than choose "file.." it's work
but if I click directly on the attachment icon on the toolbar it's not
work.
I saw that the attachment icon have the same id (777 - wordmail) as the
other menu and drop down toolbar options !
so whay it's not working ?
thanks
"Dmitry Streblechenko" wrote in message
...
Here you go. Call the Inspector.IsWordMail method and branch your code
appropriately.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"semedao" wrote in message
...
What I determined is other thing
when using word as the email editor the value changed... (777 ?)
using without it - 1079



"Dmitry Streblechenko" wrote in message
...
It looks like Outlook is using id = 1079 in Outlook 2002 and id = 777
in Outlook 2003 (both Word editor, didn't check any otherversions).
To make sure your code only depends on the Outlook version rather than
a locale, do not use the menu names, use CommandBars.FindControl
instead and specify the control id:

set btn = inspector.commandbars.findcontrol( ,777)
btn.execute

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"semedao" wrote in message
...
Hi all,
I try to replace the regular add file dialog that open when clicking
in the
Attach button.
I used code that :
1. get fired whenever I open new Email form (NewInspector)
2. get the CommandBar using
InsertCommandBar = Inspector.CommandBars["Insert"];

3. using

(CommandBarButton)InsertCommandBar.FindControl(myM issing, id,
myMissing,
myMissing, true);

to get the CommandBarButton that is clicked to insert new attachment.

and then I register to it's _CommandBarButtonEvents_ClickEventHandler

it's work well when the id paramenter whas 1079

than in other outlook languges versions , or other windows language
version
it's stop to work because or the :

InsertCommandBar = Inspector.CommandBars["Insert"];

statement return null , or the id was not 1079....

my question...

how can I determine for the correct values that are the same in all
versions
to handle it?

and also , how can I catch the insert attachment button that's appear
in the
side of the subject ?















 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to: Add a command to 'Edit' menu? Blithe Outlook Express 1 December 28th 06 11:28 PM
Outlook add-in - adding to the Appointments Insert menu Scott Lyon Outlook - Using Forms 3 October 9th 06 10:29 PM
Outlook 2003 can't import pst ; no "Import" command on File menu Spailpin Outlook - Installation 2 September 7th 06 12:08 AM
Import Export command is not visible on my File Menu Outlook 2003 Sixiron Outlook - Using Contacts 5 July 26th 06 12:01 AM
How to add "Insert File" icon to custom form? D.Farns Outlook - Using Forms 2 July 24th 06 05:07 PM


All times are GMT +1. The time now is 11:43 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.