C
Catharine Richardson
I'm designing a custom form based on the task form.
I need to capture the user name of the person who creates the task
I have looked at the following fields
Author - remains blank
Owner - defaults to the name of the mailbox where form resides (which is not
what I want)
Organizer- remains blank
Role - remains blank
So in frustration, I created a custom field "Creator2" and wrote the
following script and saved it in the form.
Function Item_Open()
Dim strCurrentUser 'as String
strcurrentuser=Application.GetNamespace("MAPI").CurrentUser
item.userproperties("Creator2")=strcurrentuser
End Function
This works beautifully, until I try to run it from a the form residing in
the shared mailbox. In which case no code will run at all.
Following advice I placed the form in Personal Library, where it will run -
but now it saves to the wrong location.
So, I'm back to square one - is there a method of capturing the current user
name?
I need to capture the user name of the person who creates the task
I have looked at the following fields
Author - remains blank
Owner - defaults to the name of the mailbox where form resides (which is not
what I want)
Organizer- remains blank
Role - remains blank
So in frustration, I created a custom field "Creator2" and wrote the
following script and saved it in the form.
Function Item_Open()
Dim strCurrentUser 'as String
strcurrentuser=Application.GetNamespace("MAPI").CurrentUser
item.userproperties("Creator2")=strcurrentuser
End Function
This works beautifully, until I try to run it from a the form residing in
the shared mailbox. In which case no code will run at all.
Following advice I placed the form in Personal Library, where it will run -
but now it saves to the wrong location.
So, I'm back to square one - is there a method of capturing the current user
name?