OutLook customization

M

Mohamed waheed

Hello all,
i'm working on a new add in for OutLook 2007 using c#
i'm asking about new mail explorer.
is it possible to invoke this explorer from custom command bar button ?
also i want to know , Is it possible to add a link in the new item menu?
any help will be appreciated,
Thanks.
 
K

Ken Slovak - [MVP - Outlook]

Do you mean you want to add a new Explorer from a command bar button? Sure,
just create the button as usual (Explorer.CommandBars collection) and then
call the Explorers.Add method, which will return the handle to a new
Explorer. You can then add UI to that Explorer also.
 
M

Mohamed waheed

thank your for replying.
the scenario is :
i've created a form region from visual studio and i joined it to display in the new mail explorer , i'm looking for a way to invoke this form region from another place not only from its original place in the new mail explorer , how can i do that ?
Thanks in advance for your expected cooperation.
 
K

Ken Slovak - [MVP - Outlook]

A form region is specific to an Outlook item. It can be shown in the preview
pane in an Explorer or in an open item in an Inspector. Those are the only
places where forms regions can exist and they are always tied to a specific
item.
 
M

Mohamed waheed

Thanks kenslovak for replying.
now i want to retrieve GAL entries
i successfully retrieved the names but i want to retrieve name and mobile number from GAL not from my contacts folder
is there any way to do that within c#?
i'm using the follwing code to retrive the Contacts names from GAL:

Outlook.Application oApplication = new Outlook.Application();
Outlook.NameSpace oNameSpace = oApplication.GetNamespace("MAPI");
// Outlook.MAPIFolder oContacts = oNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolde rContacts);
Outlook.AddressList oAddresList = oNameSpace.AddressLists["Global Address list"];
Outlook.AddressEntries alEntry = oAddresList.AddressEntries;
oNameSpace.Logon("username", "password", false, true);
foreach (Outlook.AddressEntry entry in alEntry)
{
listViewContacts.Items.Add(entry.Name);
}
 
K

Ken Slovak - [MVP - Outlook]

Use of NameSpace.Logon will not allow you to log into any mailbox on the
server. Outlook doesn't support dynamic logons.

The code you show does retrieve entries from the GAL, not from any Contacts
folder.

Mobile phone number is not directly exposed for an AddressEntry object in
the Outlook object model. You can retrieve it using PropertyAccessor in
Outlook 2007. Since use of CDO 1.21 or Extended MAPI is not supported in
managed code your alternative for Outlook 2003 or earlier would be to use
Redemption or some other COM wrapper for Extended MAPI. The mobile phone
number field of an AddressEntry object in the GAL would be
PR_MOBILE_TELPHONE_NUMBER (0x3A1C001E).
 

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