Adding button in inspector using shared outlook 2003 addin

V

vidishasharma

After we double click any mail a new inspecrtor window is opened up
where we can read the mail. Is there any way if we can add a button
next to subject: in this inspector window as soon as we double click
on this mail item for reading .
 
K

Ken Slovak - [MVP - Outlook]

That are isn't exposed to code, nor is the InfoBar. Again the only way to do
that would be extensive use of Win32 API calls and handling, just like your
other inquiry.
 
V

vidishasharma

That is bad I am really very sad to know this and now I really do not
know how I will proceed. In the meanwhile there is an installable in
site 'http://www.linkedin.com/static?
key=outlook_toolbar_download&trk=hb_ft_otool' , it is an addin and I
saw they have added a button to the reading pane. Is that achieved
using .Net addin or some other like c++ addin I am not sure.

Can I use custom form to achive what I have mentioned.......
 
K

Ken Slovak - [MVP - Outlook]

LinkedIn uses Win32 API calls to do that, just like I mentioned. How exactly
they're doing it is their trade secret.

A custom form could be used but has all the other problems associated with
custom forms. Other than using Win32 calls a custom form is about the only
way you could do that. You'd have to publish the form and make it the
default form for all messages of course and deal with the problems of the
forms cache, etc. Any code you used in a custom form would of course be
written in VBScript, the only language used in custom forms and custom forms
and form code won't run unless the form is published.
 
V

vidishasharma

I think I should go ahead with custom form atlease I will get some
boks which will help me with this approach whearas I have no idea of
WIN 32 API's

In the meanwhile is it feasible to use the same approach for my
reading pane problem as well.
 
K

Ken Slovak - [MVP - Outlook]

Other than using Win32 calls the only way to modify what shows up in the
reading pane is with Outlook 2007 and using form regions.
 
V

vidishasharma

WIN 32 api's I am scared of them :(

Well for my this issue, I am able to add button next to subject:
using custom forms (relief !!!!!!!)

Now I am trying to add event handlers to this button

code I am using is as :
outlook.Pages pages = (Ol.Pages)Inspector.ModifiedFormPages;
Form20.UserForm modifiedFormPage = pages["testformlibrary"] as
Form20.UserForm;

where "testformlibrary" is the name of my custom form I have created
in my outlook. however by doing this I am getting modifiedFormPage
object as null. Can you guide me what wrong I am doing.
 
K

Ken Slovak - [MVP - Outlook]

I told you that events and code for the custom form have to be written using
VBScript and be embedded in the form as form code. You can't handle a form
code button's click event in your addin code and certainly not using C#.
 
V

vidishasharma

I am able to achieve this as Form20.UserForm modifiedFormPage =
pages["Message"] did the trick.

For reading pane I have no other option but to use Win32 api's so I
implemented IWin32Window in my class and used
[DllImport("user32")]
public static extern IntPtr FindWindow(string lpClassName, string
lpWindowName); to find the window.

Now I do not know what class name I have to pass for the reading pane
so that I get handle for the reading pane.

I was using spy ++ still no luck. Can somebody guide me on this.
 
K

Ken Slovak - [MVP - Outlook]

You might want to start a separate thread with your question in the subject
and see if anyone knows the window name and class for the reading pane.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top