Programmatically accessing Outlook properties

Status
Not open for further replies.
K

Krutika Suchak

Hi,

Programmatically we are accessing outlook contact property and synchronizing

the outlook contact with MS CRM 4.0.

Till now we were using each property individually to get/set the properties

and we were syncing very few fields to CRM so it was manageble but now we

need to sync the fields on demand to CRM so in this case specifiing each

property in the code and handling them indicidually is pain. We need to make

it dynamically. So what we thought is we will maintain a xml file in the

solution and will add the node with property name and datatype but the

question here is which name to refer and how to get/ set properties just with

the property name? As far as I know we can set/ get properties by using

Tags.(intelisense-propertyname). Dont know how to proceed with this? Thanks

for any kind of help.

Thanks,

Krutika
 
The Outlook property names you would need to use and their data types are

all listed in the Object Browser. Just use that on whatever objects such as

ContactItem you want.

You can use string values representing property names with the

ItemProperties collection of a ContactItem.

For example:

sPropName = "Subject"

sPropValue = oContact.ItemProperties.Item(sPropName)

An ItemProperty object has a Type property that returns a member of the

OlUserProeprtyType enum that will tell you the data type for the property.

"Krutika Suchak" <KrutikaSuchak> wrote in message

news:C105B445-B65B-445C-A27C-2DEC3C7E5644@microsoft.com...
> Hi,

> Programmatically we are accessing outlook contact property and
> synchronizing
> the outlook contact with MS CRM 4.0.
> Till now we were using each property individually to get/set the
> properties
> and we were syncing very few fields to CRM so it was manageble but now we
> need to sync the fields on demand to CRM so in this case specifiing each
> property in the code and handling them indicidually is pain. We need to
> make
> it dynamically. So what we thought is we will maintain a xml file in the
> solution and will add the node with property name and datatype but the
> question here is which name to refer and how to get/ set properties just
> with
> the property name? As far as I know we can set/ get properties by using
> Tags.(intelisense-propertyname). Dont know how to proceed with this?
> Thanks
> for any kind of help.

> Thanks,
> Krutika
 
Thanks for the reply but the question here is we do not want to hard code the

attribute name we just want to take is dynamically from some XML file.

We are thinking of maintaining a XML file whose structure can be like:

<outlookattributes
<Attribute name="Client" DataType="Boolean" /
<Attribute name="ManagerPhone" DataType="String" /
> .....

</outlookattributes
so we can fetch attribute name from this file and can use what you have

suggested.

For this, where will we get the name of all PR_ tags for the Outlook fields.
 
First you have to decide what you want.

Do you want Outlook property names or do you want MAPI tags in PR format?

MAPI tags are listed in various MAPI header files that are part of Windows

SDK among other downloads. You can also use a MAPI viewer such as MFCMAPI or

OutlookSpy to get PR type tags for properties or get DASL type property

tags.

Outlook object model property names you can get from the Object Browser or

run prototype code iterating the ItemProperties collection of an item.

"Krutika Suchak" <KrutikaSuchak> wrote in message

news:FDC7FDE9-E975-4739-B175-F907FC6BB6E3@microsoft.com...
> Thanks for the reply but the question here is we do not want to hard code
> the
> attribute name we just want to take is dynamically from some XML file.

> We are thinking of maintaining a XML file whose structure can be like:
> <outlookattributes
> <Attribute name="Client" DataType="Boolean" /
> <Attribute name="ManagerPhone" DataType="String" /
> ......
> </outlookattributes
> so we can fetch attribute name from this file and can use what you have
> suggested.

> For this, where will we get the name of all PR_ tags for the Outlook
> fields.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
S Programmatically accessing Outlook Calendar data Using Outlook 1
B Accessing Outlook 2003 Signature Programmatically using C# Outlook VBA and Custom Forms 6
J VBA Cannot programmatically input or change Value for User Defined field Using Outlook 1
B Programmatically force html send and insert clipboard contents into body Outlook VBA and Custom Forms 0
Dr. Demento Programmatically encrypt email (2010) Using Outlook 10
oliv- Reduce the size of picture attachments: programmatically Outlook VBA and Custom Forms 3
B Adding controls programmatically Using Outlook 1
M programmatically make all Appointmentitem olResource Attendees unsendable Using Outlook 1
R Send appointments data to a Form programmatically Outlook VBA and Custom Forms 2
M How to connect to SQL DB from outlook programmatically? Outlook VBA and Custom Forms 1
B Programmatically scheduling WebEx meetings through Outlook Outlook VBA and Custom Forms 1
N Help in programmatically setting formatting in an AppointmentItem Outlook VBA and Custom Forms 3
V How to programmatically set "Display reminders and tasks frm pstfolder Outlook VBA and Custom Forms 1
R Displaying a field from the field chooser programmatically Outlook VBA and Custom Forms 1
M How to programmatically select a outlook search folder? Outlook VBA and Custom Forms 1
M How to install custom mapi form programmatically? Outlook VBA and Custom Forms 1
A Programmatically duplicating BCM's "Link to Record" function BCM (Business Contact Manager) 2
L Programmatically moving between pages in a form Outlook VBA and Custom Forms 2
S Programmatically bring up Advanced Find for contacts? Outlook VBA and Custom Forms 1
S assign task programmatically Outlook VBA and Custom Forms 2
S do Reply, Reply to All, Forward programmatically Outlook VBA and Custom Forms 2
S Problem Accessing .MSG Property 'ImageNaturalHeight' Tag '0x80010003' Outlook VBA and Custom Forms 1
M Accessing ALL Outlook contact fields Outlook VBA and Custom Forms 3
RBLampert Accessing Outlook accounts from multiple computers Using Outlook 8
E Accessing shared outlook folder doesn't work since switch to new outlook/excel Outlook VBA and Custom Forms 11
J Accessing calendar items for Resource Mailboxes Outlook VBA and Custom Forms 2
S Outlook [Online - Office365] perfomance is getting affected when accessing the mails using Redemptio Using Outlook 1
J Accessing Hotmail accounts with Outlook 2016 Using Outlook 3
n2b Accessing Plain Text Draft Without Outlook Using Outlook 3
G Issues with accessing Outlook Contact Picture with VBA Outlook VBA and Custom Forms 4
M Accessing ExpiryTime property Outlook VBA and Custom Forms 1
M Accessing BCM with Excel / Running Reports BCM (Business Contact Manager) 1
C Problem accessing events for folder "username" Server Threw Exception Using Outlook 1
P accessing custom task pane with Outlook ActiveInspector Using Outlook 1
mikecox Accessing Outlook on my Win7 desktop from Win8 laptop Using Outlook 1
A "Unable to display the folder" error when accessing Group mailbox Using Outlook 0
Commodore Accessing mail from multiple devices Using Outlook 1
E Accessing User Defined Fields in BCM Database part 2 BCM (Business Contact Manager) 0
E [SOLVED] Accessing User Defined Fields in BCM Database part 1 BCM (Business Contact Manager) 9
R Accessing folder 'Other Contacts' Outlook VBA and Custom Forms 1
E Accessing a Form Region from an Inspector Outlook VBA and Custom Forms 3
E Accessing a Form Region from an Inspector Outlook VBA and Custom Forms 3
D Accessing Global Address List details with VBA Outlook VBA and Custom Forms 1
H Accessing a control on a frame in Outlook with VBScript Outlook VBA and Custom Forms 1
K assistant accessing from her home computer BCM (Business Contact Manager) 2
A Accessing .pst folder in outlook using VBA Code Outlook VBA and Custom Forms 4
J Outlook closes when accessing History in BCM BCM (Business Contact Manager) 4
L Outlook Forms-Accessing Outlook VBA and Custom Forms 1
C Accessing _RecipientControl1 (Assigned To) Outlook VBA and Custom Forms 2
K Accessing contact's custom properties in a Outlook 2007 form region Outlook VBA and Custom Forms 1

Similar threads

Back
Top