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.

Can't Get From Field in Custom Form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Lane - 26 Apr 2007 15:22 GMT
The code below in a custom form displays various fields except the From field
(which I dragged over from the Field Chooser). I used the name in the
properties, but I guess that's not it - the VB script gets an error. Could
someone tell me what the correct From field name is? Thanks.

Sub Item_PropertyChange(ByVal Name)

If Name = "Subject" then
    msgbox "hello - Subject"
    MsgBox "Subject = " & Item.subject
     MsgBox " User Field Test = " & Item.UserProperties.Item("Test")
    MsgBox "From = " & Item._RecipientControl1
end if

End Sub
Sue Mosher [MVP-Outlook] - 30 Apr 2007 18:35 GMT
When in doubt, check the object browser: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from <All Libraries> to Outlook to browse all Outlook objects and their properties, methods, and events. Select any object or member, then press F1 to see its Help topic.

It shouldn't be too hard to find the MailItem.SenderName property. This property is set only after the message is sent, though. You might want to explain just what you're trying to accomplish with your code.  

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
 

> The code below in a custom form displays various fields except the From field
> (which I dragged over from the Field Chooser). I used the name in the
[quoted text clipped - 11 lines]
>
> End Sub
 
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.