Form Fields losing On-Exit Macro on protected Template file

J

Joshua

First off let me link the file so you can see exactly what I'm talking
about:

http://www.jkfweb.com/files/Travel Request Form.dot

If I right click on template and choose open and view the fields they
have an on-exit macro associated with them and work normally.

If I double click on the file and it create a new file, it dis-attaches
the macro on exit for all form fields and check mark boxes.

On the newly created file the Command Button with vba code to e-mail
still works fine, and if I look at the modules the macros are still there.

This is possibly the strangest thing I've seen :)

I believe it was working fine about 2 hours ago.

I thought it was possibly due to the bookmark name for fields being 2-3
letters then a number so I made them longer like full names and it
didn't matter.

I'm curious if anyone can figure this one out..

Thanks!!

Joshua
 
J

Joshua

I figured out what the problem was.

I apparently at one point renamed the original .doc file to .dot

I've never had an issue with this before, but just for the heck of it
and because I was out of other ideas I renamed it back to .doc and then
did a file save as to a dot file and tried again.

Everything works fine now.

Joshua
 
J

Jean-Guy Marcil

Joshua was telling us:
Joshua nous racontait que :
I figured out what the problem was.

I apparently at one point renamed the original .doc file to .dot

You should never do that as a template is more than a three letter
extension...
I've never had an issue with this before, but just for the heck of it

Pure luck!
Well, you did have an issue this time!
and because I was out of other ideas I renamed it back to .doc and
then did a file save as to a dot file and tried again.
Everything works fine now.

Glad you worked it out.

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
J

Joshua

Oh believe me I will never again make that mistake again :)

I also discovered today that when putting Command Button's into text
box's so you can hide them or delete them with ease that you will have
problems unless you set the TakeFocus on click to false or off.

I was having an issue with documents where the button wouldn't also work
the first time, but if I unprotected the document and pushed the button
or even ran the code in the editor without clicking button it would work.

Nowhere in this article
http://word.mvps.org/faqs/tblsfldsfms/hideprintbuttoncontent.htm does it
mention the take focus property of a command button causing issue.

Btw I can't say how much that the MVP's that volunteer here have helped
me, and how much I appreciate that.

And the site www.mvps.org is a lifesaver for someone who is technical
but dabbling in a new field such as VBA.

Joshua
 

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