Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / April 2007

Tip: Looking for answers? Try searching our database.

Author information wanted (Outlook 2003/SP2)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Catharine Richardson - 24 Apr 2007 22:54 GMT
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?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.