Property name for large Text field in Outlook 2k2/2k3 Contacts?

J

Jack Black

Hi, all! Does anyone know what the object property name is for the large
text field on the General tab of a Contact in Outlook 2k2/2k3 is? I've
tried many of those listed in the object model, but none work. The VB.Net
development group referred me over here...

Thanks!
Jack
 
P

PaulD

: Hi, all! Does anyone know what the object property name is for the large
: text field on the General tab of a Contact in Outlook 2k2/2k3 is? I've
: tried many of those listed in the object model, but none work. The VB.Net
: development group referred me over here...
:
: Thanks!
: Jack
:
did you try .body? That works using VBA
Paul D
 
J

Jack Black

Paul, thanks for responding!

Yes, I've tried Body... No go. :( I'm starting to think that maybe it's a
collection rather than a simple text box...

Jack
 
S

Sue Mosher [MVP-Outlook]

ContactItem.Body is correct. What code doesn't work to give you the idea that it isn't?

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

Jack Black

Hi, Sue!

In my code I'm writing new records via the CreateItem method of the
Outlook.Application object (Outlook.ContactItem). Sample code follows:

Dim oCT As Outlook.ContactItem =
oApp.CreateItem(Outlook.OlItemType.olContactItem)
With sttUser
If .strFullName <> "" Then oCT.FullName = .strFullName
If .strFirstName <> "" Then oCT.FirstName = .strFirstName
If .strNote <> "" Then oCT.Body = .strNote
If .strTitle <> "" Then oCT.Title = .strTitle
oCT.Save()
End With

"sttUser" is a structure that contains data imported from another contact
manager application; some lines have been deleted to save bandwidth. There
are no errors thrown during the Save operation, and all data (except .Body)
are written correctly. I know there's good data in the variable in question
because I can write it in it's entirety in other fields (such as the
user-defined fields of Outlook).

Thanks!
Jack


ContactItem.Body is correct. What code doesn't work to give you the idea
that it isn't?

FYI, there is a newsgroup specifically for general Outlook programming
issues "down the hall" at microsoft.public.outlook.program_vba or, via web
interface, at
http://www.microsoft.com/office/community/en-us/default.mspx?dg=microsoft.public.outlook.program_vba


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Sue Mosher [MVP-Outlook]

I don't see any problems with your code below. What happens if you try it like this for a test:

If .strNote <> "" Then
oCT.Body = Left(Trim(.strNote), 10)
End If

to see if there is an issue related to the size of the .strNote text.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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