PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
Referencing userproperties
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
Referencing userproperties
![]() |
Referencing userproperties |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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" <fg@hotmail.com> wrote in message news:4090a28b$1@duster.adelaide.on.net... > 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 > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

