docm files opened in Word 2003 don't work

P

Paul1066

Excuse me if this question has already been answered. I have word document
that was created in Word 2003 that has a button control on it with VBA behind
the click event of the button. I have loaded this document in Office 2007
and the button works with no issues. I have saved it as a docm file and
Office 2007 can still open it and the button works. When I open the docm
document in Word 2003 with the compatibility pack installed the button is not
longer a button but a picture which is not longer attached to the VBA code.
The VBA code still exists in the document it is just that the button does not
convert to a button from docm to doc. Is there a reason for this?
 
J

Jay Freedman

Sorry, that's just one of the decisions Microsoft's developers made about
how the Compatibility Pack would deal with Office 2007 files. I can't defend
it, since I don't know the technical details involved.

It appears you have two alternatives. The less attractive one is to re-save
the document from Word 2007 in Word 2003 format; at least in my test, that
kept an operational command button in the document.

The better alternative is to replace the command button with a macrobutton
field (http://www.word.mvps.org/FAQs/MacrosVBA/AssignMacroToButton.htm) and
move the code to a subroutine in a regular module (in the VBA editor, select
the document and click Insert > Module). The name of the macro goes in the
code of the field. You can also make it so the macrobutton field needs only
a single click; see "Double-click or single-click" in
http://www.word.mvps.org/FAQs/TblsFldsFms/HLinksInForms.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
P

Paul1066

Thank you, that worked.

Jay Freedman said:
Sorry, that's just one of the decisions Microsoft's developers made about
how the Compatibility Pack would deal with Office 2007 files. I can't defend
it, since I don't know the technical details involved.

It appears you have two alternatives. The less attractive one is to re-save
the document from Word 2007 in Word 2003 format; at least in my test, that
kept an operational command button in the document.

The better alternative is to replace the command button with a macrobutton
field (http://www.word.mvps.org/FAQs/MacrosVBA/AssignMacroToButton.htm) and
move the code to a subroutine in a regular module (in the VBA editor, select
the document and click Insert > Module). The name of the macro goes in the
code of the field. You can also make it so the macrobutton field needs only
a single click; see "Double-click or single-click" in
http://www.word.mvps.org/FAQs/TblsFldsFms/HLinksInForms.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.



.
 

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