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 / September 2005

Tip: Looking for answers? Try searching our database.

What sub or function triggered when message opens?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gene - 21 Sep 2005 07:15 GMT
Hi everyone,

Is it possible to execute a VBScript commands when you open or read e-mail
from Inbox (Outlook)?  I've tried to use the Function Item_Read() and
Function Item_Open() but it doesn't work.

Thanks.
Sue Mosher [MVP-Outlook] - 21 Sep 2005 13:31 GMT
Item_Open fires when the item is opened in its own window. Did you publish your form? Code doesn't run on unpublished forms.

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

> Hi everyone,
>
[quoted text clipped - 3 lines]
>
> Thanks.
Gene - 28 Sep 2005 00:59 GMT
Hi,

Yes, I did published the form in Personal Forms Library.  Is there any way
to execute a code similar function with "Request a read receipt for this
message"? When you open your mail from Inbox, it fires a code asking for
action for instance.

Thanks.

> Item_Open fires when the item is opened in its own window. Did you publish your form? Code doesn't run on unpublished forms.
>
[quoted text clipped - 5 lines]
> >
> > Thanks.
Sue Mosher [MVP-Outlook] - 28 Sep 2005 15:22 GMT
Sure. In your scenario, this code asks if you want to request a read receipt when you create a new message :

Function Item_Open()
   If Item.Size = 0 Then
       strMsg = "Do you want to ask for a read receipt?"
       res = MsgBox(strMsg, vbQuestion + vbYesNo, "Request Read Receipt?"
       Item.ReadReceiptRequested = (res = vbYes)
   End If
End Function

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

> Hi,
>
[quoted text clipped - 12 lines]
>> >
>> > Thanks.
 
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.