Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using VBScript in Outlook 200

Status
Not open for further replies.

HGNYPEM

Programmer
Mar 27, 2003
2
US
OK heres is my problem: Im working with a co-worker and she designed a form in outlook that another department in the company uses. The form is sent to the person who it is addressed. When received the person is supposed to fill out the "solution" to the problem and hit reply. This is where the problem comes in...when the reply button is clicked a message box is supposed to pop up saying your message has been sent and the form is supposed to close...here is what i have coded:

Function Item_Reply(ByVal Response)
MsgBox "Your Message Has Been Sent.", vbInformation, "Reply"
Me.Close 1
End Function

It works flawlessly on some computers, but on others the window will not close, anyone have any idea why?????
 
ok here is another prblem i forgot to mention

sometimes it says
"The original item must be saved before the operation can be completed."

this happens after i have sent the form to the other person and they click reply...the it should pop up and say the message has been sent but it doesnt and also it should automatically close but it doesnt always do that either


here is my revised code

Function Item_Reply(ByVal Response)
MsgBox "Your Message Has Been Sent", vbinformation, "Reply"
Const olDiscard = 1
Const olSave = 0
If blnIsDirty = True Then
Item.Close olSave
Else
Item.Close olDiscard
End If
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top