PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Form Programming Referencing userproperties

Reply

Referencing userproperties

 
Thread Tools Rate Thread
Old 29-04-2004, 07:34 AM   #1
FG
Guest
 
Posts: n/a
Default Referencing userproperties


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


  Reply With Quote
Old 30-04-2004, 05:05 AM   #2
FG
Guest
 
Posts: n/a
Default Re: Referencing userproperties

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
>
>



  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