PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Form Programming How do I access user-defined fields in one-off'd contact items?

Reply

How do I access user-defined fields in one-off'd contact items?

 
Thread Tools Rate Thread
Old 24-08-2004, 07:54 PM   #1
Roman Spanner
Guest
 
Posts: n/a
Default How do I access user-defined fields in one-off'd contact items?


I've tried using the following two methods;

I've tried using the following two bits of code, but they don't work;

varValue = cdoMessage.Fields(strField).Value ' using CDO

and

varValue = outContactItem.UserProperties(strField).Value ' using the
Outlook object model

Can you tell me what I'm doing wrong? Is there another method/property I
should be using?

Should I be able to extract the values from user-defined fields in a
one-offed item?

Many thanks in advance,

Philip Street


  Reply With Quote
Old 24-08-2004, 09:34 PM   #2
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: How do I access user-defined fields in one-off'd contact items?

varValue = outContactItem.UserProperties(strField) should work fine. If it
doesn't, display the item in form design view and take a look at the All
Fields tab to see if that field (check for typos!!!) actually exists in the
item. If it has never held data, it may not.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Roman Spanner" <philip.street@nospam.virgin.net> wrote in message
news:E9MWc.37$k4.31@newsfe3-gui.ntli.net...
> I've tried using the following two methods;
>
> I've tried using the following two bits of code, but they don't work;
>
> varValue = cdoMessage.Fields(strField).Value ' using CDO
>
> and
>
> varValue = outContactItem.UserProperties(strField).Value ' using the
> Outlook object model
>
> Can you tell me what I'm doing wrong? Is there another method/property I
> should be using?
>
> Should I be able to extract the values from user-defined fields in a
> one-offed item?
>
> Many thanks in advance,
>
> Philip Street
>
>



  Reply With Quote
Old 24-08-2004, 10:00 PM   #3
Philip Street
Guest
 
Posts: n/a
Default Re: How do I access user-defined fields in one-off'd contact items?

Sue,

I've now displayed the All Fields tab on my custom form and have found the
following.

I've opened one of the items and found that some of my user-defined fields
are displayed in the "user-defined fields in item". One of those fields
("Contract Value") has a value ("£12,000.00"), in this view, but when I
display the "user-defined fields in folder" view, the same field is listed
but without a value. Do you know the cause of this behaviour, and how it
might be fixed?

You recall that I mentioned before that some of the items an a Post icon
next to them rather than a Contact icon, in the Phone List view. Well, I've
just created a new contact and this also has a Post icon. This appears to
happen for all new contacts created with the form. Any ideas about this as
well?

As ever, you assistance is much appreciated. I didn't realise custom Outlook
solutions could be so tortuous!

Cheers,

Phil

p.s. I've ran the "clean one-off items" code you've suggested against all
the contacts, but am not sure whether it worked or not - how do I check?

"Sue Mosher [MVP-Outlook]" <suemvp@outlookcode.com> wrote in message
news:uLgBqjhiEHA.1040@TK2MSFTNGP09.phx.gbl...
> varValue = outContactItem.UserProperties(strField) should work fine. If it
> doesn't, display the item in form design view and take a look at the All
> Fields tab to see if that field (check for typos!!!) actually exists in

the
> item. If it has never held data, it may not.
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "Roman Spanner" <philip.street@nospam.virgin.net> wrote in message
> news:E9MWc.37$k4.31@newsfe3-gui.ntli.net...
> > I've tried using the following two methods;
> >
> > I've tried using the following two bits of code, but they don't work;
> >
> > varValue = cdoMessage.Fields(strField).Value ' using CDO
> >
> > and
> >
> > varValue = outContactItem.UserProperties(strField).Value ' using the
> > Outlook object model
> >
> > Can you tell me what I'm doing wrong? Is there another method/property

I
> > should be using?
> >
> > Should I be able to extract the values from user-defined fields in a
> > one-offed item?
> >
> > Many thanks in advance,
> >
> > Philip Street
> >
> >

>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off