Referencing userproperties

F

FG

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
 
F

FG

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


FG said:
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
 

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

Similar Threads


Top