Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / April 2004

Tip: Looking for answers? Try searching our database.

Referencing userproperties

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
FG - 29 Apr 2004 07:34 GMT
I'm aware that there are many posts regarding referencing userproperties,
but I simply cannot seem to get my code to work.

Here is a code sample ...

li_retval=lole_mapi_session.connecttonewobject("MAPI.Session")
lole_mapi_session.logon(ls_default_profile)

lole_outlook=create oleobject
li_retval=lole_outlook.connecttoNewObject("outlook.application")

lole_namespace=lole_outlook.getnamespace("MAPI")
lole_currentuser=lole_namespace.currentuser
lole_recipient=lole_namespace.createRecipient(dw_2.object.recipient_name[1])

lole_object_folder=lole_namespace.GetSharedDefaultFolder(lole_recipient,olFo
lderTasks)

lole_taskitem=lole_object_folder.items.add("IPM.Task.M_action_response")  //
this works fine

lole_userproperties=lole_taskitem.userproperties    // >>>> THIS RETURNS
NULL

// address custom userproperties in form
lole_taskitem.userproperties.find("objective").value=ls_objective  // THIS
CAUSES A CRASH DUE TO A NULL REFERENCE

Any ideas will be greatfully appreciated.  I've spent 15 hours trying to
crack this!

Thanks

Steve
FG - 30 Apr 2004 05:05 GMT
Found the answer.  For anyone else who has this problem, take notice of
where you publish the form!  I had it published in the wrong folder &
nothing worked.

Steve

> I'm aware that there are many posts regarding referencing userproperties,
> but I simply cannot seem to get my code to work.
[quoted text clipped - 9 lines]
> lole_namespace=lole_outlook.getnamespace("MAPI")
> lole_currentuser=lole_namespace.currentuser

lole_recipient=lole_namespace.createRecipient(dw_2.object.recipient_name[1])

lole_object_folder=lole_namespace.GetSharedDefaultFolder(lole_recipient,olFo
> lderTasks)
>
[quoted text clipped - 14 lines]
>
> Steve
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.