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?
Sue Mosher [MVP-Outlook] - 25 Apr 2007 03:28 GMT
To get code to run for an item in a shared mailbox, you need to tweak the registry. See http://www.outlookcode.com/d/secforms.htm

Signature
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> 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
[quoted text clipped - 22 lines]
> So, I'm back to square one - is there a method of capturing the current user
> name?