Group:  Microsoft Outlook » microsoft.public.outlook.program_addins
Thread: Reading Pane Context Menu VBA Help

Geek News

Reading Pane Context Menu VBA Help
"Paul" <pkatz[ at ]qwest.com> 8/3/2006 11:42:22 PM
I'm an experienced VBA Excel programmer, but am new to Outlook. I need
some help adding a custom menu item to one of Outlook's pop up context
menus.

I hope I can word the appropriate question here.

I have Outlook 2003 installed locally. It uses our corporate network
mail servers. Our administrators have set up the Outlook reading pane
to display a "windows messenger" icon next to the sender's name and
email address at the top of the pane. If you click the icon or right
click the senders name, a pop up menu appears showing several of the
senders properties from our corporate ldap source (e.g., name, business
phone, location, etc.). In addition Outlook provides other menu items
in the pop up like: additional actions, create rule, lookup outlook
contact, and outlook properties.

I would like to insert a custom menu item in this pop up. It would use
the senders name to essentially follow a hyperlink to a web page.

Could you outline how I might programmatically insert this custom menu
item (couldn't find the name/id for the pop up). Does Outlook have a
FollowHyperlink method which would bring up the web page?

Thanks Very Much,
Paul Katz

Re: Reading Pane Context Menu VBA Help
"Michael Bauer [MVP - Outlook]" <mb[ at ]mvps.org> 8/4/2006 6:06:28 AM
Am 3 Aug 2006 16:42:22 -0700 schrieb Paul:

In Outlook < 2007 you don´t have full control over the contex menu. Here´s a
sample how you might work around it:
http://www.outlookcode.com/threads.aspx?forumid=4&messageid=18141

OL does not have a FollowHyperlink method. You could use the Shell instead:

Private Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, _
ByVal lpFile As String, ByVal lpParameters As String, _
ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Public Sub ShowWebSite(Site As String)
ShellExecute 0, "open", Site, vbNullString, vbNullString, 1
End Sub

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


[Quoted Text]
> I'm an experienced VBA Excel programmer, but am new to Outlook. I need
> some help adding a custom menu item to one of Outlook's pop up context
> menus.
>
> I hope I can word the appropriate question here.
>
> I have Outlook 2003 installed locally. It uses our corporate network
> mail servers. Our administrators have set up the Outlook reading pane
> to display a "windows messenger" icon next to the sender's name and
> email address at the top of the pane. If you click the icon or right
> click the senders name, a pop up menu appears showing several of the
> senders properties from our corporate ldap source (e.g., name, business
> phone, location, etc.). In addition Outlook provides other menu items
> in the pop up like: additional actions, create rule, lookup outlook
> contact, and outlook properties.
>
> I would like to insert a custom menu item in this pop up. It would use
> the senders name to essentially follow a hyperlink to a web page.
>
> Could you outline how I might programmatically insert this custom menu
> item (couldn't find the name/id for the pop up). Does Outlook have a
> FollowHyperlink method which would bring up the web page?
>
> Thanks Very Much,
> Paul Katz
Re: Reading Pane Context Menu VBA Help
"asidden[ at ]gmail.com" <asidden[ at ]gmail.com> 8/4/2006 9:16:47 AM

Better to see some more info about the Persona Menu & Smart Tags. You
can add custom menu items only to "Additional Actions" submenu. Here is
an usefull link to start with:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stagsdk/html/stconPersonaMenu_HV01082081.asp

Good luck

Paul wrote:
[Quoted Text]
> I'm an experienced VBA Excel programmer, but am new to Outlook. I need
> some help adding a custom menu item to one of Outlook's pop up context
> menus.
>
> I hope I can word the appropriate question here.
>
> I have Outlook 2003 installed locally. It uses our corporate network
> mail servers. Our administrators have set up the Outlook reading pane
> to display a "windows messenger" icon next to the sender's name and
> email address at the top of the pane. If you click the icon or right
> click the senders name, a pop up menu appears showing several of the
> senders properties from our corporate ldap source (e.g., name, business
> phone, location, etc.). In addition Outlook provides other menu items
> in the pop up like: additional actions, create rule, lookup outlook
> contact, and outlook properties.
>
> I would like to insert a custom menu item in this pop up. It would use
> the senders name to essentially follow a hyperlink to a web page.
>
> Could you outline how I might programmatically insert this custom menu
> item (couldn't find the name/id for the pop up). Does Outlook have a
> FollowHyperlink method which would bring up the web page?
>
> Thanks Very Much,
> Paul Katz

Re: Reading Pane Context Menu VBA Help
"Paul" <pkatz[ at ]qwest.com> 8/4/2006 5:19:34 PM
Thanks - I'd settle for adding to the "Additional Actions" persona
submenu. Could you point me to an example or two? The MS link didn't
really say too much.

asidden[ at ]gmail.com wrote:
[Quoted Text]
> Better to see some more info about the Persona Menu & Smart Tags. You
> can add custom menu items only to "Additional Actions" submenu. Here is
> an usefull link to start with:
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stagsdk/html/stconPersonaMenu_HV01082081.asp
>
> Good luck
>
> Paul wrote:
> > I'm an experienced VBA Excel programmer, but am new to Outlook. I need
> > some help adding a custom menu item to one of Outlook's pop up context
> > menus.
> >
> > I hope I can word the appropriate question here.
> >
> > I have Outlook 2003 installed locally. It uses our corporate network
> > mail servers. Our administrators have set up the Outlook reading pane
> > to display a "windows messenger" icon next to the sender's name and
> > email address at the top of the pane. If you click the icon or right
> > click the senders name, a pop up menu appears showing several of the
> > senders properties from our corporate ldap source (e.g., name, business
> > phone, location, etc.). In addition Outlook provides other menu items
> > in the pop up like: additional actions, create rule, lookup outlook
> > contact, and outlook properties.
> >
> > I would like to insert a custom menu item in this pop up. It would use
> > the senders name to essentially follow a hyperlink to a web page.
> >
> > Could you outline how I might programmatically insert this custom menu
> > item (couldn't find the name/id for the pop up). Does Outlook have a
> > FollowHyperlink method which would bring up the web page?
> >
> > Thanks Very Much,
> > Paul Katz

Re: Reading Pane Context Menu VBA Help
"asidden[ at ]gmail.com" <asidden[ at ]gmail.com> 8/5/2006 2:20:34 PM
Hi, Paul

As You could read in MSDN article I've mentioned earlier, Smart Tag You
need to use to add a custom menu item to "Additional Actions" submenu
is #PersonName (urn:schemas-microsoft-com:office:smarttags#PersonName).
So, You have to expand existing system Smart Tag with Your custom
actions. As far as I've understood from Your the very first post - you
need to create a menu item, which can take user to some web-page,
depending on his name. There are 2 possible ways to implement this
stuff: expand Smart Tag with special-formatted XML or with the help of
Smart Tag DLL, which You'll need to implement using C#, VB.NET
languages or unmanaged VC++ with ATL (if You're against .Net technology
at all :) ). (From my experience, I can tell you only that using .Net
will be the best decision, because Smart Tag DLLs implemented with
unmanaged VC++ have a little bit strange behaviour in the latest Office
applications). The decision which way to use (XML or DLL) depends on
what type of target URL You need and how it depends on contact's name.

The following links contains enough information about Smart Tag XML &
DLL developing:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnofftalk/html/office06072001.asp

http://search.msdn.microsoft.com/search/default.aspx?siteId=0&tab=0&query=Developing+Smart+Tag+Solutions

Good luck

If You'll have any problems with implementation just let me know

Paul wrote:
[Quoted Text]
> Thanks - I'd settle for adding to the "Additional Actions" persona
> submenu. Could you point me to an example or two? The MS link didn't
> really say too much.
>
> asidden[ at ]gmail.com wrote:
> > Better to see some more info about the Persona Menu & Smart Tags. You
> > can add custom menu items only to "Additional Actions" submenu. Here is
> > an usefull link to start with:
> >
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stagsdk/html/stconPersonaMenu_HV01082081.asp
> >
> > Good luck
> >
> > Paul wrote:
> > > I'm an experienced VBA Excel programmer, but am new to Outlook. I need
> > > some help adding a custom menu item to one of Outlook's pop up context
> > > menus.
> > >
> > > I hope I can word the appropriate question here.
> > >
> > > I have Outlook 2003 installed locally. It uses our corporate network
> > > mail servers. Our administrators have set up the Outlook reading pane
> > > to display a "windows messenger" icon next to the sender's name and
> > > email address at the top of the pane. If you click the icon or right
> > > click the senders name, a pop up menu appears showing several of the
> > > senders properties from our corporate ldap source (e.g., name, business
> > > phone, location, etc.). In addition Outlook provides other menu items
> > > in the pop up like: additional actions, create rule, lookup outlook
> > > contact, and outlook properties.
> > >
> > > I would like to insert a custom menu item in this pop up. It would use
> > > the senders name to essentially follow a hyperlink to a web page.
> > >
> > > Could you outline how I might programmatically insert this custom menu
> > > item (couldn't find the name/id for the pop up). Does Outlook have a
> > > FollowHyperlink method which would bring up the web page?
> > >
> > > Thanks Very Much,
> > > Paul Katz

Re: Reading Pane Context Menu VBA Help
"Paul" <pkatz[ at ]qwest.com> 8/15/2006 8:11:47 PM
Thanks so much for the info.

I was able to add a custom action to #PersonName via XML, and submit a
web query of the form
http://directory.corporate.com/search?name={TEXT}

Two more questions:
1. does the #PersonName smart tag expose any other fields besides
{TEXT}? (e.g., like {UID} for a unique user id),
2. can I open a url in it's own window? Right now the url comes up in
the first available browser currently opened.

Thanks again,
Paul

asidden[ at ]gmail.com wrote:
[Quoted Text]
> Hi, Paul
>
> As You could read in MSDN article I've mentioned earlier, Smart Tag You
> need to use to add a custom menu item to "Additional Actions" submenu
> is #PersonName (urn:schemas-microsoft-com:office:smarttags#PersonName).
> So, You have to expand existing system Smart Tag with Your custom
> actions. As far as I've understood from Your the very first post - you
> need to create a menu item, which can take user to some web-page,
> depending on his name. There are 2 possible ways to implement this
> stuff: expand Smart Tag with special-formatted XML or with the help of
> Smart Tag DLL, which You'll need to implement using C#, VB.NET
> languages or unmanaged VC++ with ATL (if You're against .Net technology
> at all :) ). (From my experience, I can tell you only that using .Net
> will be the best decision, because Smart Tag DLLs implemented with
> unmanaged VC++ have a little bit strange behaviour in the latest Office
> applications). The decision which way to use (XML or DLL) depends on
> what type of target URL You need and how it depends on contact's name.
>
> The following links contains enough information about Smart Tag XML &
> DLL developing:
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnofftalk/html/office06072001.asp
>
> http://search.msdn.microsoft.com/search/default.aspx?siteId=0&tab=0&query=Developing+Smart+Tag+Solutions
>
> Good luck
>
> If You'll have any problems with implementation just let me know
>
> Paul wrote:
> > Thanks - I'd settle for adding to the "Additional Actions" persona
> > submenu. Could you point me to an example or two? The MS link didn't
> > really say too much.
> >
> > asidden[ at ]gmail.com wrote:
> > > Better to see some more info about the Persona Menu & Smart Tags. You
> > > can add custom menu items only to "Additional Actions" submenu. Here is
> > > an usefull link to start with:
> > >
> > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stagsdk/html/stconPersonaMenu_HV01082081.asp
> > >
> > > Good luck
> > >
> > > Paul wrote:
> > > > I'm an experienced VBA Excel programmer, but am new to Outlook. I need
> > > > some help adding a custom menu item to one of Outlook's pop up context
> > > > menus.
> > > >
> > > > I hope I can word the appropriate question here.
> > > >
> > > > I have Outlook 2003 installed locally. It uses our corporate network
> > > > mail servers. Our administrators have set up the Outlook reading pane
> > > > to display a "windows messenger" icon next to the sender's name and
> > > > email address at the top of the pane. If you click the icon or right
> > > > click the senders name, a pop up menu appears showing several of the
> > > > senders properties from our corporate ldap source (e.g., name, business
> > > > phone, location, etc.). In addition Outlook provides other menu items
> > > > in the pop up like: additional actions, create rule, lookup outlook
> > > > contact, and outlook properties.
> > > >
> > > > I would like to insert a custom menu item in this pop up. It would use
> > > > the senders name to essentially follow a hyperlink to a web page.
> > > >
> > > > Could you outline how I might programmatically insert this custom menu
> > > > item (couldn't find the name/id for the pop up). Does Outlook have a
> > > > FollowHyperlink method which would bring up the web page?
> > > >
> > > > Thanks Very Much,
> > > > Paul Katz

Re: Reading Pane Context Menu VBA Help
"asidden[ at ]gmail.com" <asidden[ at ]gmail.com> 8/16/2006 8:12:28 AM
Hi there, Paul

According to Smart Tag SDK Documentation, if You implement Your Smart
Tag via XML only next dynamic values are accessible for YOU:

{LCID}- an integer corresponding to the user's current user
interface language lcid.

{TEXT}- the smart tagged text from which the action was initiated.
Smart tag text is encoded for HTTP posting. This means that spaces are
converted to %20s, and so forth.

This is so, because XML allows to implement only the simpliest Smart
Tag Actions. If You want anything more difficult - implement Your Smart
Tag as DLL - this really opens the gate to the real world :).

Paul wrote:
[Quoted Text]
> Thanks so much for the info.
>
> I was able to add a custom action to #PersonName via XML, and submit a
> web query of the form
> http://directory.corporate.com/search?name={TEXT}
>
> Two more questions:
> 1. does the #PersonName smart tag expose any other fields besides
> {TEXT}? (e.g., like {UID} for a unique user id),
> 2. can I open a url in it's own window? Right now the url comes up in
> the first available browser currently opened.
>
> Thanks again,
> Paul
>
> asidden[ at ]gmail.com wrote:
> > Hi, Paul
> >
> > As You could read in MSDN article I've mentioned earlier, Smart Tag You
> > need to use to add a custom menu item to "Additional Actions" submenu
> > is #PersonName (urn:schemas-microsoft-com:office:smarttags#PersonName).
> > So, You have to expand existing system Smart Tag with Your custom
> > actions. As far as I've understood from Your the very first post - you
> > need to create a menu item, which can take user to some web-page,
> > depending on his name. There are 2 possible ways to implement this
> > stuff: expand Smart Tag with special-formatted XML or with the help of
> > Smart Tag DLL, which You'll need to implement using C#, VB.NET
> > languages or unmanaged VC++ with ATL (if You're against .Net technology
> > at all :) ). (From my experience, I can tell you only that using .Net
> > will be the best decision, because Smart Tag DLLs implemented with
> > unmanaged VC++ have a little bit strange behaviour in the latest Office
> > applications). The decision which way to use (XML or DLL) depends on
> > what type of target URL You need and how it depends on contact's name.
> >
> > The following links contains enough information about Smart Tag XML &
> > DLL developing:
> >
> > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnofftalk/html/office06072001.asp
> >
> > http://search.msdn.microsoft.com/search/default.aspx?siteId=0&tab=0&query=Developing+Smart+Tag+Solutions
> >
> > Good luck
> >
> > If You'll have any problems with implementation just let me know
> >
> > Paul wrote:
> > > Thanks - I'd settle for adding to the "Additional Actions" persona
> > > submenu. Could you point me to an example or two? The MS link didn't
> > > really say too much.
> > >
> > > asidden[ at ]gmail.com wrote:
> > > > Better to see some more info about the Persona Menu & Smart Tags. You
> > > > can add custom menu items only to "Additional Actions" submenu. Here is
> > > > an usefull link to start with:
> > > >
> > > > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/stagsdk/html/stconPersonaMenu_HV01082081.asp
> > > >
> > > > Good luck
> > > >
> > > > Paul wrote:
> > > > > I'm an experienced VBA Excel programmer, but am new to Outlook. I need
> > > > > some help adding a custom menu item to one of Outlook's pop up context
> > > > > menus.
> > > > >
> > > > > I hope I can word the appropriate question here.
> > > > >
> > > > > I have Outlook 2003 installed locally. It uses our corporate network
> > > > > mail servers. Our administrators have set up the Outlook reading pane
> > > > > to display a "windows messenger" icon next to the sender's name and
> > > > > email address at the top of the pane. If you click the icon or right
> > > > > click the senders name, a pop up menu appears showing several of the
> > > > > senders properties from our corporate ldap source (e.g., name, business
> > > > > phone, location, etc.). In addition Outlook provides other menu items
> > > > > in the pop up like: additional actions, create rule, lookup outlook
> > > > > contact, and outlook properties.
> > > > >
> > > > > I would like to insert a custom menu item in this pop up. It would use
> > > > > the senders name to essentially follow a hyperlink to a web page.
> > > > >
> > > > > Could you outline how I might programmatically insert this custom menu
> > > > > item (couldn't find the name/id for the pop up). Does Outlook have a
> > > > > FollowHyperlink method which would bring up the web page?
> > > > >
> > > > > Thanks Very Much,
> > > > > Paul Katz

Your Help required abt context and Preview pane
"kedar" <k.vaijanapurkar[ at ]gmail.com> 8/21/2006 7:40:36 AM
HOW HAVE YOU obtained context menu of Preview/Reading pane
please paste some sample code that worked with you
i'm developing in vb.net and want to have my menuitem in context menu
of previewpane
so that right click on from,to ,attachement can give me my menuitem
added in context menu..

Paul wrote:
[Quoted Text]
> I'm an experienced VBA Excel programmer, but am new to Outlook. I need
> some help adding a custom menu item to one of Outlook's pop up context
> menus.
>
> I hope I can word the appropriate question here.
>
> I have Outlook 2003 installed locally. It uses our corporate network
> mail servers. Our administrators have set up the Outlook reading pane
> to display a "windows messenger" icon next to the sender's name and
> email address at the top of the pane. If you click the icon or right
> click the senders name, a pop up menu appears showing several of the
> senders properties from our corporate ldap source (e.g., name, business
> phone, location, etc.). In addition Outlook provides other menu items
> in the pop up like: additional actions, create rule, lookup outlook
> contact, and outlook properties.
>
> I would like to insert a custom menu item in this pop up. It would use
> the senders name to essentially follow a hyperlink to a web page.
>
> Could you outline how I might programmatically insert this custom menu
> item (couldn't find the name/id for the pop up). Does Outlook have a
> FollowHyperlink method which would bring up the web page?
>
> Thanks Very Much,
> Paul Katz

Re: Your Help required abt context and Preview pane
"asidden[ at ]gmail.com" <asidden[ at ]gmail.com> 8/21/2006 2:15:03 PM
Hi, Kedar!

I've e-mailed You one sample. Hope, it'll help


kedar wrote:
[Quoted Text]
> HOW HAVE YOU obtained context menu of Preview/Reading pane
> please paste some sample code that worked with you
> i'm developing in vb.net and want to have my menuitem in context menu
> of previewpane
> so that right click on from,to ,attachement can give me my menuitem
> added in context menu..
>
> Paul wrote:
> > I'm an experienced VBA Excel programmer, but am new to Outlook. I need
> > some help adding a custom menu item to one of Outlook's pop up context
> > menus.
> >
> > I hope I can word the appropriate question here.
> >
> > I have Outlook 2003 installed locally. It uses our corporate network
> > mail servers. Our administrators have set up the Outlook reading pane
> > to display a "windows messenger" icon next to the sender's name and
> > email address at the top of the pane. If you click the icon or right
> > click the senders name, a pop up menu appears showing several of the
> > senders properties from our corporate ldap source (e.g., name, business
> > phone, location, etc.). In addition Outlook provides other menu items
> > in the pop up like: additional actions, create rule, lookup outlook
> > contact, and outlook properties.
> >
> > I would like to insert a custom menu item in this pop up. It would use
> > the senders name to essentially follow a hyperlink to a web page.
> >
> > Could you outline how I might programmatically insert this custom menu
> > item (couldn't find the name/id for the pop up). Does Outlook have a
> > FollowHyperlink method which would bring up the web page?
> >
> > Thanks Very Much,
> > Paul Katz

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net