Outlook Read Email Does Not Run My Custom Form

  • Thread starter Thread starter Mike Appell
  • Start date Start date
M

Mike Appell

Hello - I have a custom Email form in Outlook I have designed with a button
on it (with script code).
However, I notice that when I double click on a form in my inbox the custom
form is loaded so that that I can read the Email on the custom form. But,
the button won't work unless I then click Form, Run this form. Isn't there
a way that I can make the button work automatically when the user reads
their Email so that they can just click the button rather than click Tools,
Run this form and then click the button. I'm guessing that maybe Microsoft
did this so that scripts won't run but I'm wondering if there is an easy way
to activate that button.

Thanks
 
If the form runs code when you use Run This Form in design mode, but doesn't run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to the Organization Forms library or a public folder's forms library, as appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal Forms library. Save it as an .oft file and send it to other people who need to use it with instructions to publish it with the same form name that you used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down the hall" at microsoft.public.outlook.program_forms or, via web interface, at http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms
 
Sue - thanks for the reply and I'll definitely check out the other groups.
The only problem with the form is when I read the Email. That is when I
need to click Form, Run this form. The script code is still in the form,
it's just when I read the form from Outlook I need to click Form, Run this
form to get the button to work. I'm thinking that when I read the form from
the inbox it should not even have the Form option on the menu pad but should
just automatically run the form so that the button works.

If I click Reply or Forward it works just fine. It's almost as if the user
can click on the button when it is in the Edit Compose Page mode (when they
are sending or replying to mail) but when it is in the Edit Read Page mode
(when they open the form to read their mail) the button won't work unless
they click Form, Run this form. The script code is definitely being sent
with the form because after they read the mail from the inbox they can click
Form, Run this form and then the button on the form will work.

Thanks again for all your help,
Mike.


If the form runs code when you use Run This Form in design mode, but doesn't
run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal
Forms library. Save it as an .oft file and send it to other people who need
to use it with instructions to publish it with the same form name that you
used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms or, via web interface, at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms


--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Did you the list I posted, especially the first item? I believe this is the cause of the problem.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Sue - thanks for the reply and I'll definitely check out the other groups.
The only problem with the form is when I read the Email. That is when I
need to click Form, Run this form. The script code is still in the form,
it's just when I read the form from Outlook I need to click Form, Run this
form to get the button to work. I'm thinking that when I read the form from
the inbox it should not even have the Form option on the menu pad but should
just automatically run the form so that the button works.

If I click Reply or Forward it works just fine. It's almost as if the user
can click on the button when it is in the Edit Compose Page mode (when they
are sending or replying to mail) but when it is in the Edit Read Page mode
(when they open the form to read their mail) the button won't work unless
they click Form, Run this form. The script code is definitely being sent
with the form because after they read the mail from the inbox they can click
Form, Run this form and then the button on the form will work.

Thanks again for all your help,
Mike.


If the form runs code when you use Run This Form in design mode, but doesn't
run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal
Forms library. Save it as an .oft file and send it to other people who need
to use it with instructions to publish it with the same form name that you
used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms or, via web interface, at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms
 
Sue - That did do the trick. I unchecked it on one form but forgot to do it
on the other.

Thanks again so much,
Mike

Did you the list I posted, especially the first item? I believe this is the
cause of the problem.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Sue - thanks for the reply and I'll definitely check out the other groups.
The only problem with the form is when I read the Email. That is when I
need to click Form, Run this form. The script code is still in the form,
it's just when I read the form from Outlook I need to click Form, Run this
form to get the button to work. I'm thinking that when I read the form
from
the inbox it should not even have the Form option on the menu pad but
should
just automatically run the form so that the button works.

If I click Reply or Forward it works just fine. It's almost as if the
user
can click on the button when it is in the Edit Compose Page mode (when
they
are sending or replying to mail) but when it is in the Edit Read Page mode
(when they open the form to read their mail) the button won't work unless
they click Form, Run this form. The script code is definitely being sent
with the form because after they read the mail from the inbox they can
click
Form, Run this form and then the button on the form will work.

Thanks again for all your help,
Mike.


If the form runs code when you use Run This Form in design mode, but
doesn't
run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to
the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal
Forms library. Save it as an .oft file and send it to other people who
need
to use it with instructions to publish it with the same form name that you
used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms or, via web interface, at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms
 
Did you the list I posted, especially the first item? I believe this is the
cause of the problem.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Sue - thanks for the reply and I'll definitely check out the other groups.
The only problem with the form is when I read the Email. That is when I
need to click Form, Run this form. The script code is still in the form,
it's just when I read the form from Outlook I need to click Form, Run this
form to get the button to work. I'm thinking that when I read the form
from
the inbox it should not even have the Form option on the menu pad but
should
just automatically run the form so that the button works.

If I click Reply or Forward it works just fine. It's almost as if the
user
can click on the button when it is in the Edit Compose Page mode (when
they
are sending or replying to mail) but when it is in the Edit Read Page mode
(when they open the form to read their mail) the button won't work unless
they click Form, Run this form. The script code is definitely being sent
with the form because after they read the mail from the inbox they can
click
Form, Run this form and then the button on the form will work.

Thanks again for all your help,
Mike.


If the form runs code when you use Run This Form in design mode, but
doesn't
run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to
the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal
Forms library. Save it as an .oft file and send it to other people who
need
to use it with instructions to publish it with the same form name that you
used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms or, via web interface, at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms
 
Forgot to ask - exactly what does unchecking this box do? Are there any
disadvantages of unchecking it?

Thanks again,
Mike

Did you the list I posted, especially the first item? I believe this is the
cause of the problem.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Sue - thanks for the reply and I'll definitely check out the other groups.
The only problem with the form is when I read the Email. That is when I
need to click Form, Run this form. The script code is still in the form,
it's just when I read the form from Outlook I need to click Form, Run this
form to get the button to work. I'm thinking that when I read the form
from
the inbox it should not even have the Form option on the menu pad but
should
just automatically run the form so that the button works.

If I click Reply or Forward it works just fine. It's almost as if the
user
can click on the button when it is in the Edit Compose Page mode (when
they
are sending or replying to mail) but when it is in the Edit Read Page mode
(when they open the form to read their mail) the button won't work unless
they click Form, Run this form. The script code is definitely being sent
with the form because after they read the mail from the inbox they can
click
Form, Run this form and then the button on the form will work.

Thanks again for all your help,
Mike.


If the form runs code when you use Run This Form in design mode, but
doesn't
run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to
the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal
Forms library. Save it as an .oft file and send it to other people who
need
to use it with instructions to publish it with the same form name that you
used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms or, via web interface, at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms
 
When that box is checked, the form layout is embedded in the item and no code will run. When that box is unchecked, in order to display the form and run its code, the user needs access to the published form definition.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Forgot to ask - exactly what does unchecking this box do? Are there any
disadvantages of unchecking it?

Thanks again,
Mike

Did you the list I posted, especially the first item? I believe this is the
cause of the problem.

Mike said:
Sue - thanks for the reply and I'll definitely check out the other groups.
The only problem with the form is when I read the Email. That is when I
need to click Form, Run this form. The script code is still in the form,
it's just when I read the form from Outlook I need to click Form, Run this
form to get the button to work. I'm thinking that when I read the form
from
the inbox it should not even have the Form option on the menu pad but
should
just automatically run the form so that the button works.

If I click Reply or Forward it works just fine. It's almost as if the
user
can click on the button when it is in the Edit Compose Page mode (when
they
are sending or replying to mail) but when it is in the Edit Read Page mode
(when they open the form to read their mail) the button won't work unless
they click Form, Run this form. The script code is definitely being sent
with the form because after they read the mail from the inbox they can
click
Form, Run this form and then the button on the form will work.

Thanks again for all your help,
Mike.


If the form runs code when you use Run This Form in design mode, but
doesn't
run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to
the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal
Forms library. Save it as an .oft file and send it to other people who
need
to use it with instructions to publish it with the same form name that you
used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms or, via web interface, at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms
 
That will work perfect for me. Thanks again.

Mike

When that box is checked, the form layout is embedded in the item and no
code will run. When that box is unchecked, in order to display the form and
run its code, the user needs access to the published form definition.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Forgot to ask - exactly what does unchecking this box do? Are there any
disadvantages of unchecking it?

Thanks again,
Mike

Did you the list I posted, especially the first item? I believe this is
the
cause of the problem.

Mike said:
Sue - thanks for the reply and I'll definitely check out the other
groups.
The only problem with the form is when I read the Email. That is when I
need to click Form, Run this form. The script code is still in the form,
it's just when I read the form from Outlook I need to click Form, Run
this
form to get the button to work. I'm thinking that when I read the form
from
the inbox it should not even have the Form option on the menu pad but
should
just automatically run the form so that the button works.

If I click Reply or Forward it works just fine. It's almost as if the
user
can click on the button when it is in the Edit Compose Page mode (when
they
are sending or replying to mail) but when it is in the Edit Read Page
mode
(when they open the form to read their mail) the button won't work unless
they click Form, Run this form. The script code is definitely being sent
with the form because after they read the mail from the inbox they can
click
Form, Run this form and then the button on the form will work.

Thanks again for all your help,
Mike.


If the form runs code when you use Run This Form in design mode, but
doesn't
run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to
the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal
Forms library. Save it as an .oft file and send it to other people who
need
to use it with instructions to publish it with the same form name that
you
used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible
causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms or, via web interface, at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms
 
Well - I thought checking the box would fix the problem. Apparently it
fixes it but only if I send the form from within Outlook by clicking the
Chhose Form and selecting it form the Personal Forms Library (the forms I
published). The problem is I'm trying to launch this Email programmatically
from my FoxPro application. So, the Email is being launched outside of
Outlook and it is doing that "one-off" again. This is the basic code I'm
using to launch the Email form where A1OlNew is the name of my Outlook New
Mail custom form:

loApp = GetObject( "", "Outlook.Application" )
loNameSpace = loApp.GetNameSpace("MAPI")
loOutbox = loNameSpace.GetDefaultFolder(4)
loMsg = loOutbox.Items.Add("IPM.Note.A1OLNew")
loMsg.Display()

Is there anything I can do?
Thanks again,
Mike



When that box is checked, the form layout is embedded in the item and no
code will run. When that box is unchecked, in order to display the form and
run its code, the user needs access to the published form definition.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Forgot to ask - exactly what does unchecking this box do? Are there any
disadvantages of unchecking it?

Thanks again,
Mike

Did you the list I posted, especially the first item? I believe this is
the
cause of the problem.

Mike said:
Sue - thanks for the reply and I'll definitely check out the other
groups.
The only problem with the form is when I read the Email. That is when I
need to click Form, Run this form. The script code is still in the form,
it's just when I read the form from Outlook I need to click Form, Run
this
form to get the button to work. I'm thinking that when I read the form
from
the inbox it should not even have the Form option on the menu pad but
should
just automatically run the form so that the button works.

If I click Reply or Forward it works just fine. It's almost as if the
user
can click on the button when it is in the Edit Compose Page mode (when
they
are sending or replying to mail) but when it is in the Edit Read Page
mode
(when they open the form to read their mail) the button won't work unless
they click Form, Run this form. The script code is definitely being sent
with the form because after they read the mail from the inbox they can
click
Form, Run this form and then the button on the form will work.

Thanks again for all your help,
Mike.


If the form runs code when you use Run This Form in design mode, but
doesn't
run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to
the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal
Forms library. Save it as an .oft file and send it to other people who
need
to use it with instructions to publish it with the same form name that
you
used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible
causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms or, via web interface, at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms
 
The details about the published version of IPM.Note.A1OLNew are what's important. Where is it published? And what is the state of the "send form definition with item" box on that published version. Also check http://www.slipstick.com/dev/formpub.htm#oneoff for other possible one-off cuases.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Well - I thought checking the box would fix the problem. Apparently it
fixes it but only if I send the form from within Outlook by clicking the
Chhose Form and selecting it form the Personal Forms Library (the forms I
published). The problem is I'm trying to launch this Email programmatically
from my FoxPro application. So, the Email is being launched outside of
Outlook and it is doing that "one-off" again. This is the basic code I'm
using to launch the Email form where A1OlNew is the name of my Outlook New
Mail custom form:

loApp = GetObject( "", "Outlook.Application" )
loNameSpace = loApp.GetNameSpace("MAPI")
loOutbox = loNameSpace.GetDefaultFolder(4)
loMsg = loOutbox.Items.Add("IPM.Note.A1OLNew")
loMsg.Display()

Is there anything I can do?
Thanks again,
Mike



When that box is checked, the form layout is embedded in the item and no
code will run. When that box is unchecked, in order to display the form and
run its code, the user needs access to the published form definition.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Forgot to ask - exactly what does unchecking this box do? Are there any
disadvantages of unchecking it?

Thanks again,
Mike

Did you the list I posted, especially the first item? I believe this is
the
cause of the problem.

Mike said:
Sue - thanks for the reply and I'll definitely check out the other
groups.
The only problem with the form is when I read the Email. That is when I
need to click Form, Run this form. The script code is still in the form,
it's just when I read the form from Outlook I need to click Form, Run
this
form to get the button to work. I'm thinking that when I read the form
from
the inbox it should not even have the Form option on the menu pad but
should
just automatically run the form so that the button works.

If I click Reply or Forward it works just fine. It's almost as if the
user
can click on the button when it is in the Edit Compose Page mode (when
they
are sending or replying to mail) but when it is in the Edit Read Page
mode
(when they open the form to read their mail) the button won't work unless
they click Form, Run this form. The script code is definitely being sent
with the form because after they read the mail from the inbox they can
click
Form, Run this form and then the button on the form will work.

Thanks again for all your help,
Mike.


If the form runs code when you use Run This Form in design mode, but
doesn't
run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to
the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your Personal
Forms library. Save it as an .oft file and send it to other people who
need
to use it with instructions to publish it with the same form name that
you
used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible
causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down the
hall" at microsoft.public.outlook.program_forms or, via web interface, at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms
Hello - I have a custom Email form in Outlook I have designed with a
button
on it (with script code).
However, I notice that when I double click on a form in my inbox the
custom
form is loaded so that that I can read the Email on the custom form.
But,
the button won't work unless I then click Form, Run this form. Isn't
there
a way that I can make the button work automatically when the user reads
their Email so that they can just click the button rather than click
Tools,
Run this form and then click the button. I'm guessing that maybe
Microsoft
did this so that scripts won't run but I'm wondering if there is an easy
way
to activate that button.

Thanks
 
It's published in the Personal Forms Library. When I use the code from my
application to write new mail, if I then first click Tools, Forms, Design
this form I can see that "Send Form Definitiion With Item" is unchecked. If
I click the button on the form it works. I then send the form to myself. I
then go into Outlook and read the Email I sent to myself and the button does
not work. I click Tools, Forms, Design this form I can see that "Send Form
Definitiion With Item" is still unchecked. However, if I do the same thing
but I open the published form to write mail directly in Outlook by clicking
the New dropdown and then I click Choose Form and I go into the Personal
Forms Libaray where the form was published and send the Email to myself then
the button works fine. It's as if the code my application is using is not
sending the form from my Personal Forms Libarry. The personal forms library
is where I am publishing the forms to in Outlook. Perhaps the following
code is not grabbing the form from that library. Is there something I need
to change in the code?

loApp = GetObject( "", "Outlook.Application" )
loNameSpace = loApp.GetNameSpace("MAPI")
loOutbox = loNameSpace.GetDefaultFolder(4)
loMsg = loOutbox.Items.Add("IPM.Note.A1OLNew")
loMsg.Display()

Thank you again for your continued assistance,
Mike



The details about the published version of IPM.Note.A1OLNew are what's
important. Where is it published? And what is the state of the "send form
definition with item" box on that published version. Also check
http://www.slipstick.com/dev/formpub.htm#oneoff for other possible one-off
cuases.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Well - I thought checking the box would fix the problem. Apparently it
fixes it but only if I send the form from within Outlook by clicking the
Chhose Form and selecting it form the Personal Forms Library (the forms I
published). The problem is I'm trying to launch this Email
programmatically
from my FoxPro application. So, the Email is being launched outside of
Outlook and it is doing that "one-off" again. This is the basic code I'm
using to launch the Email form where A1OlNew is the name of my Outlook New
Mail custom form:

loApp = GetObject( "", "Outlook.Application" )
loNameSpace = loApp.GetNameSpace("MAPI")
loOutbox = loNameSpace.GetDefaultFolder(4)
loMsg = loOutbox.Items.Add("IPM.Note.A1OLNew")
loMsg.Display()

Is there anything I can do?
Thanks again,
Mike



When that box is checked, the form layout is embedded in the item and no
code will run. When that box is unchecked, in order to display the form
and
run its code, the user needs access to the published form definition.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Forgot to ask - exactly what does unchecking this box do? Are there any
disadvantages of unchecking it?

Thanks again,
Mike

Did you the list I posted, especially the first item? I believe this is
the
cause of the problem.

Mike said:
Sue - thanks for the reply and I'll definitely check out the other
groups.
The only problem with the form is when I read the Email. That is when I
need to click Form, Run this form. The script code is still in the
form,
it's just when I read the form from Outlook I need to click Form, Run
this
form to get the button to work. I'm thinking that when I read the form
from
the inbox it should not even have the Form option on the menu pad but
should
just automatically run the form so that the button works.

If I click Reply or Forward it works just fine. It's almost as if the
user
can click on the button when it is in the Edit Compose Page mode (when
they
are sending or replying to mail) but when it is in the Edit Read Page
mode
(when they open the form to read their mail) the button won't work
unless
they click Form, Run this form. The script code is definitely being
sent
with the form because after they read the mail from the inbox they can
click
Form, Run this form and then the button on the form will work.

Thanks again for all your help,
Mike.


If the form runs code when you use Run This Form in design mode, but
doesn't
run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to
the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your
Personal
Forms library. Save it as an .oft file and send it to other people who
need
to use it with instructions to publish it with the same form name that
you
used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible
causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down
the
hall" at microsoft.public.outlook.program_forms or, via web interface,
at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms
Hello - I have a custom Email form in Outlook I have designed with a
button
on it (with script code).
However, I notice that when I double click on a form in my inbox the
custom
form is loaded so that that I can read the Email on the custom form.
But,
the button won't work unless I then click Form, Run this form. Isn't
there
a way that I can make the button work automatically when the user reads
their Email so that they can just click the button rather than click
Tools,
Run this form and then click the button. I'm guessing that maybe
Microsoft
did this so that scripts won't run but I'm wondering if there is an
easy
way
to activate that button.

Thanks
 
If the IPM.Note.A1OLNew form is published only in the Personal Forms library, Outlook will "grab" it from there when you open the item.

The symptoms you describe still point to the likelihood of a one-off form, though I can't imagine why it would behave differently when created programmatically vs. manually (unless you actually have two similar forms with different names). You can check whether it's a one-off by examining the values of the Size and MessageClass properties of the received item. If it is, you should take a look at the other possible causes at the link I posted below -- particularly code that can cause one-offing.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
It's published in the Personal Forms Library. When I use the code from my
application to write new mail, if I then first click Tools, Forms, Design
this form I can see that "Send Form Definitiion With Item" is unchecked. If
I click the button on the form it works. I then send the form to myself. I
then go into Outlook and read the Email I sent to myself and the button does
not work. I click Tools, Forms, Design this form I can see that "Send Form
Definitiion With Item" is still unchecked. However, if I do the same thing
but I open the published form to write mail directly in Outlook by clicking
the New dropdown and then I click Choose Form and I go into the Personal
Forms Libaray where the form was published and send the Email to myself then
the button works fine. It's as if the code my application is using is not
sending the form from my Personal Forms Libarry. The personal forms library
is where I am publishing the forms to in Outlook. Perhaps the following
code is not grabbing the form from that library. Is there something I need
to change in the code?

loApp = GetObject( "", "Outlook.Application" )
loNameSpace = loApp.GetNameSpace("MAPI")
loOutbox = loNameSpace.GetDefaultFolder(4)
loMsg = loOutbox.Items.Add("IPM.Note.A1OLNew")
loMsg.Display()

Thank you again for your continued assistance,
Mike



The details about the published version of IPM.Note.A1OLNew are what's
important. Where is it published? And what is the state of the "send form
definition with item" box on that published version. Also check
http://www.slipstick.com/dev/formpub.htm#oneoff for other possible one-off
cuases.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Mike said:
Well - I thought checking the box would fix the problem. Apparently it
fixes it but only if I send the form from within Outlook by clicking the
Chhose Form and selecting it form the Personal Forms Library (the forms I
published). The problem is I'm trying to launch this Email
programmatically
from my FoxPro application. So, the Email is being launched outside of
Outlook and it is doing that "one-off" again. This is the basic code I'm
using to launch the Email form where A1OlNew is the name of my Outlook New
Mail custom form:

loApp = GetObject( "", "Outlook.Application" )
loNameSpace = loApp.GetNameSpace("MAPI")
loOutbox = loNameSpace.GetDefaultFolder(4)
loMsg = loOutbox.Items.Add("IPM.Note.A1OLNew")
loMsg.Display()

Is there anything I can do?
Thanks again,
Mike



When that box is checked, the form layout is embedded in the item and no
code will run. When that box is unchecked, in order to display the form
and
run its code, the user needs access to the published form definition.

Mike said:
Forgot to ask - exactly what does unchecking this box do? Are there any
disadvantages of unchecking it?

Thanks again,
Mike

Did you the list I posted, especially the first item? I believe this is
the
cause of the problem.

Sue - thanks for the reply and I'll definitely check out the other
groups.
The only problem with the form is when I read the Email. That is when I
need to click Form, Run this form. The script code is still in the
form,
it's just when I read the form from Outlook I need to click Form, Run
this
form to get the button to work. I'm thinking that when I read the form
from
the inbox it should not even have the Form option on the menu pad but
should
just automatically run the form so that the button works.

If I click Reply or Forward it works just fine. It's almost as if the
user
can click on the button when it is in the Edit Compose Page mode (when
they
are sending or replying to mail) but when it is in the Edit Read Page
mode
(when they open the form to read their mail) the button won't work
unless
they click Form, Run this form. The script code is definitely being
sent
with the form because after they read the mail from the inbox they can
click
Form, Run this form and then the button on the form will work.

Thanks again for all your help,
Mike.


If the form runs code when you use Run This Form in design mode, but
doesn't
run code after you have sent or saved an item using the 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 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]

-- For in-house corporate use with Exchange Server, publish the form to
the
Organization Forms library or a public folder's forms library, as
appropriate for your application.

-- For collaboration via the Internet, publish your form to your
Personal
Forms library. Save it as an .oft file and send it to other people who
need
to use it with instructions to publish it with the same form name that
you
used.

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.slipstick.com/dev/formpub.htm#oneoff for other possible
causes.

[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.

FYI, there is a newsgroup specifically for Outlook forms issues "down
the
hall" at microsoft.public.outlook.program_forms or, via web interface,
at
http://www.microsoft.com/office/com...spx?dg=microsoft.public.outlook.program_forms



Hello - I have a custom Email form in Outlook I have designed with a
button
on it (with script code).
However, I notice that when I double click on a form in my inbox the
custom
form is loaded so that that I can read the Email on the custom form.
But,
the button won't work unless I then click Form, Run this form. Isn't
there
a way that I can make the button work automatically when the user reads
their Email so that they can just click the button rather than click
Tools,
Run this form and then click the button. I'm guessing that maybe
Microsoft
did this so that scripts won't run but I'm wondering if there is an
easy
way
to activate that button.

Thanks
 
Back
Top