Custom Form can't be Delivered

B

Boyd

I have a custom form which I plan on sending to employees on a weekly
basis. They enter #'s in custom textfields, and send the form on to my
supervisor. Their method of sending the form is by clicking a command
button, which fires the following code:
Item.To = "John Smith (Supervisor)"
Item.Send

For some reason, the message is being returned to them as
undeliverable. I assume this is happening b/c the original email is
coming from my Inbox, and is therefore still "attached" to their form.
I've tried manipulating the From field, but am realizing that this
cannot be done within custom forms.
This issue has nothing to do with the status of my supervisor's Inbox.
I've had a few employees send him test emails (not using my custom
form), which went thru without a problem.

Any ideas how I can resolve this issue? Should I come up with a
different method for the employee to forward the email on to my
supervisor (for instance, instead of using code, try using the Forward
button)? I'm not really sure how to approach this, as I am new to
Outlook programming.

Any help is greatly appreciated.

Thanks,
Boyd
 
S

Sue Mosher [MVP-Outlook]

Have you considered forwarding the item instead of trying to resend it?

Set fwd = Item.Forward
fwd.To = "John Smith (Supervisor)"
fwd.Send
 
B

Boyd

Thanks Sue.
Is there a way to hide the "Forward" button from displaying on my form?
I think this may confuse users into clicking "Forward", as opposed to
clicking my command button.

Boyd
 
B

Boyd

Paul,
I'm not sure what's incorrect about my vbScript.
"Item.To" and "Item.Send" are legitimate commands, are they not?

Boyd
 
S

Sue Mosher [MVP-Outlook]

Only on a newly created message. They won't work as a way to resend a message that the user received, which is what your code is trying to do.

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

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

Sue Mosher [MVP-Outlook]

You can disable the Forward command on the (Actions) page of your custom form, in design mode.

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

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

Hollis D. Paul

<[email protected]>
<[email protected]>
Newsgroups: microsoft.public.outlook.program_forms
NNTP-Posting-Host: h-66-167-48-18.sttnwaho.dynamic.covad.net 66.167.48.18
Path: number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
Lines: 1
Xref: number1.nntp.dca.giganews.com microsoft.public.outlook.program_forms:76379

Boyd said:
"Item.To"
Not this one. Here is what I did in one of my custom forms:

'Create the message, attachment, and send it
Set myMailItem = AppOutlook.CreateItem(0)
myMailItem.Subject = strSubject
myMailItem.Body = "Message with attachment for Exchange PF and
SharePoint"
Set myRecip = myMailItem.Recipients.Add(strMailAddr)
Set nyAttach = myMailItem.Attachments.Add(strSaveName)
myMailItem.Send


Hollis D. Paul [MVP - Outlook]
Mukilteo, WA USA
 

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