Forms - Edit Compose Page vrs Edit Read Page

J

Janelle

I've created an internal survey form (radio buttons and comments text field)
and I would like to have a command button that sends the form back to the
sender (me). In the design the form area I've put the same content in both
the edit compose page and edit read page and basic code
Sub CommandButton1_Click()
item.to = "(e-mail address removed)"
item.send
End sub
and it works in the compose page but not in the edit read page which is what
people will see first and I would like them to respond from. SO the person
should click on the new email and beable to click on a submit button that
returns the form to me.
Any help would be great
thanks
-J
 
S

Sue Mosher [MVP-Outlook]

If the form doesn't run code after you have sent or saved an item using the published form, you probably have done something to "one-off" the form. Outlook 2003, Outlook 2002, Outlook 2000 SP2 and Outlook 2000 or 98 with the Email Security Update will not run code on one-off forms; see http://www.outlookcode.com/d/secforms.htm for more information on this issue.

To ensure that a message form does not one-off:

-- Make sure the "Send form definition with item" box on the (Properties) tab of the form is *not* checked. [1]

-- Publish the form to the Organization Forms library on your Exchange Server.

-- Set the Forward action on a custom form's (Actions) page to the published custom form.

Many other things can cause one-off forms. If the above steps don't work on a new item created with your form, see http://www.outlookcode.com/d/formpub.htm#oneoff for other possible causes.

Also, note that it's unlikely that the user will have permission to resend the original item, which is what your code does. Alternatives are to forward the item or to create a new item, populate its properties from the data in the current item, then send it.

[1] Whenever you publish a message form, Outlook will suggest that you may want to check the "Send form definition with item" box to ensure that the recipient will have the form, especially if you're sending to someone via the Internet. In the current Outlook security environment, this suggestion is obsolete. Ignore it unless your form has no code behind it.



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

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

Janelle

I've unchecked the "send form definition with item" box and now if I send the
survey to myself it returns with an error "the custom form could not be
opened. Outlook will use an Outlook form instead. The object could not be
found."

I've tried setting a custom action as a forward action but when i try and
send the survey back after receiving it - it always says there must be a
recipient entered in the to, cc, bcc field - even if the to field in the is
present to my email address. Am I doing something wrong there? Because I
noticed when testing it that a colleague was able to forward the form back to
me with the results still entered. But I can't seem to appropriatly set the
field values so that it automatically forwards to me.

-J

Sue Mosher said:
If the form doesn't run code after you have sent or saved an item using the published form, you probably have done something to "one-off" the form. Outlook 2003, Outlook 2002, Outlook 2000 SP2 and Outlook 2000 or 98 with the Email Security Update will not run code on one-off forms; see http://www.outlookcode.com/d/secforms.htm for more information on this issue.

To ensure that a message form does not one-off:

-- Make sure the "Send form definition with item" box on the (Properties) tab of the form is *not* checked. [1]

-- Publish the form to the Organization Forms library on your Exchange Server.

-- Set the Forward action on a custom form's (Actions) page to the published custom form.

Many other things can cause one-off forms. If the above steps don't work on a new item created with your form, see http://www.outlookcode.com/d/formpub.htm#oneoff for other possible causes.

Also, note that it's unlikely that the user will have permission to resend the original item, which is what your code does. Alternatives are to forward the item or to create a new item, populate its properties from the data in the current item, then send it.

[1] Whenever you publish a message form, Outlook will suggest that you may want to check the "Send form definition with item" box to ensure that the recipient will have the form, especially if you're sending to someone via the Internet. In the current Outlook security environment, this suggestion is obsolete. Ignore it unless your form has no code behind it.



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

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


Janelle said:
I've created an internal survey form (radio buttons and comments text field)
and I would like to have a command button that sends the form back to the
sender (me). In the design the form area I've put the same content in both
the edit compose page and edit read page and basic code
Sub CommandButton1_Click()
item.to = "(e-mail address removed)"
item.send
End sub
and it works in the compose page but not in the edit read page which is what
people will see first and I would like them to respond from. SO the person
should click on the new email and beable to click on a submit button that
returns the form to me.
Any help would be great
thanks
-J
 
S

Sue Mosher [MVP-Outlook]

Try calling Item.Recipients.ResolveAll before you call Item.Send.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

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

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