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 2006

Tip: Looking for answers? Try searching our database.

vbScript Not Firing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boyd - 28 Sep 2006 20:13 GMT
I have a custom message form published to the Organizational Forms
Library.  On the form is a button with the following code behind the
Click Event:

Item.To = "johnsmith@abc.com"
Item.Send

For 99% of users, clicking the button successfully sends the form to
John Smith, and closes.  I have 2 people telling me that nothing
happens when they click the button.  This behavior sounds like the form
has one-off'ed somehow, but wouldn't everyone have the same issue if
this is the case?

I stepped 1 of the users thru clearing the forms cache, then attempted
to submit the form again .. same issue.

Any ideas what might be happening here?

Thanks,
Boyd
Hollis Paul [MVP - Outlook] - 29 Sep 2006 16:41 GMT
> Item.To = "johnsmith@abc.com"
> Item.Send

Actually, you are lucky it works for anybody.  When you set up
recipient email addresses in code, you are supposed to add a recipient
object to the recipients collection object, initialize its subfields,
and then resolve the address to be sure it will actually send.  I had
expected to find a simple writeup of this at either www.slipstick.com 
or www.outlookcode.com, but I have just spent some time at both and
cannot find anything through search.  Bummer.  Try looking up the
objects through the object browser help which you can reach using F2 in
the VBScript editor.

--
Hollis Paul
Mukilteo, WA  USA
Boyd - 29 Sep 2006 22:58 GMT
Thanks Hollis .. I wasn't aware of the recipients collection object.
I'm guessing the vbScript fired, but network connectivity issues
prevented the form from sending when the user clicked the button.

I think the best way to tackle this issue is to resolve the address
field, and include error handling in case the address doesn't resolve.
This way, the user is aware of the issue, and can re-try sending the
form when connectivity issues subside.

Thanks again.
Boyd.

> > Item.To = "johnsmith@abc.com"
> > Item.Send
[quoted text clipped - 12 lines]
> Hollis Paul
> Mukilteo, WA  USA
 
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



©2010 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.