form not closing

G

Guest

I have created a form and published it to a folder. When I run the form (for
test) it opens and I can enter information, then when I forward it to
someone, it sends, but the form stays open on my pc until I close it. Is
there a way for the form to close after it is sent just like we do when we
compose a mail message? I do not know any vb. Thanks,
 
S

Sue Mosher [MVP-Outlook]

The Close code Hollis suggests needs to go into the Forward event handler and should attempt to close the Inspector, not the Item, e.g.:

Function Item_Forward(ByVal ForwardItem)
Const olSave = 0
Const olDiscard = 1
Const olPromptForSave = 2
Set insp = Item.GetInspector
insp.Close olPromptForSave
ForwardItem.Display
End Function

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
H

Hollis Paul [MVP - Outlook]

Is
there a way for the form to close after it is sent just like we do when we
compose a mail message? I do not know any vb. Thanks,
You only need to use VBScript. But basically, after the Item.send is issued,
you want to do a Item.close(0), where the 0 means to save it first (I think.)
You should go to www.outlookcode.com and search for an example that shows
how to send Items by script.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top