Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / January 2008

Tip: Looking for answers? Try searching our database.

How to catch the click event of ASPX page in Outlook

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ravi - 24 Jan 2008 11:18 GMT
Hi,

My requirement is to refresh the folder structure in the Outlook on click of
a button on a ASPX form.
The webpage is at the web server and displayed within the outlook trough a
compatible outlook Add-in.
Is it possible to catch the Button click event of the web form inside the
Outlook so that the folder structure could be refresh with the data displayed
in the webpage?

Thanks in advance for your help and time.

Ravi
Ken Slovak - [MVP - Outlook] - 24 Jan 2008 15:01 GMT
Outlook code can't respond directly to a click in server-side ASPX code.
You'd have to find a way to notify the Outlook code that the click had
occurred. Perhaps a Web service or something like that?

Signature

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

> Hi,
>
[quoted text clipped - 11 lines]
>
> Ravi
Neetu - 25 Jan 2008 07:42 GMT
Hello Ken,

Thanks for your valuable suggestion.

We Could find out about the how to send alerts from  webserice to outlook.
we are planning to call a webservice at  aspx page button event handler.
webservice will send a required response  to outllook. for this we need a
listener at outlook end  which can be a alert configured at client machines.

we are not in possible to create a custom alert programmatically inside
addin outlook code.
so please suggest ways to create custom alerts in outlook addin and access
those events.

Thanks In advance.

> Outlook code can't respond directly to a click in server-side ASPX code.
> You'd have to find a way to notify the Outlook code that the click had
[quoted text clipped - 15 lines]
> >
> > Ravi
Ken Slovak - [MVP - Outlook] - 25 Jan 2008 15:15 GMT
If the code is running on the client machine you can iterate the
Outlook.Application.COMAddIns collection. That has all addins. You can
locate yours and reference it. This little snippet assumes using VB.NET, it
would be different using C#:

' In Connect class:

Private addInInstance As Office.COMAddIn = Nothing

' In OnConnection() event handler

addInInstance = TryCast(addInInst, Office.COMAddIn)
addInInstance.Object = Me ' critical setting

' Public Sub that can be called from outside the addin
Public Sub CalledFromOutside()
   ' do whatever you want
End Sub

Your external code that works with the Web service can then get your COM
addin from the Outlook.Application.COMAddIns collection and use code like
this to call that CalledFromOutside() method:

Dim myAddin As Office.COMAddIn = olApp.COMAddIns.Item("myAddin.Connect")
If (myAddin IsNot Nothing) Then
   myAddin.Object.CalledFromOutside()
End If

That CalledFromOutside() method can take arguments like a flag or whatever.

Signature

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

> Hello Ken,
>
[quoted text clipped - 12 lines]
>
> Thanks In advance.
Neetu - 29 Jan 2008 10:16 GMT
in our case, outside code is inside aspx page hosted inside outlook, which
gets open on click of addin folder in folder struture of outlook.

> If the code is running on the client machine you can iterate the
> Outlook.Application.COMAddIns collection. That has all addins. You can
[quoted text clipped - 42 lines]
> >
> > Thanks In advance.
Ken Slovak - [MVP - Outlook] - 29 Jan 2008 15:59 GMT
Is there a question there?

Signature

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

> in our case, outside code is inside aspx page hosted inside outlook, which
> gets open on click of addin folder in folder struture of outlook.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.