From and to Fields VBScript

G

Gil

How can I access the from and to fields of a message in vbscript
within that message?

Thanks,
Gil
 
G

Gil

Is there a good reference for this type of info?

Pardon my ignorance but would this work to retrieve the sender?

Set objFormTab = Item.GetInspector.ModifiedFormPages("Message")
Set objSender = objFormTab.MailItem("SenderName")

Thanks,
Gil
 
D

Dmitry Streblechenko

Actually there should be no "set" since SenderName property is a string, not
an object:

strSender = Item.SenderName

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
G

Gil

Thanks! This is in VB not VBA can I reference items like that in VB on
a message form?
 
G

Gil

All set now! I need a good vb introduction book that is techincal, not
point and click through forms any reccomendations?
 
D

Dmitry Streblechenko

If it is VB, not VBA, your code is not running in a form; which message form
do you mean?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
G

Gil

Do you mean VB as language, not Outlook specific? I don't use VB at all, so
I can't recomment anything.
For Outlook specific books, seehttp://www.outlookcode.com/d/library.htm

Dmitry Streblechenko (MVP)http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool






- Show quoted text -

No it's outlook specific VB, got to by going Tools->Form->Design This
Form->Form->View Code

Not a pretty place to write code. I'm wondering if I should be using
the VBA portion instead. Maybe a book will tell me that!!
 
D

Dmitry Streblechenko

That is still VBA.
By VB people usually mean the standalone IDE, such as VB6 or VB.Net

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Top