• Word 2010 – Template/Macro with Form Fields

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Word 2010 – Template/Macro with Form Fields

    Author
    Topic
    #470962

    I’ve just started an upgrade to Office 2010 from Office 2003 for our District Attorney’s Office. They have a number of macrs based on templates and I’ve gotten them all to work quite well except for the envelope template/macro which has a form field for the insertion of the TO: Address. The Template works just fine if it’s opened or used as a new document based on it; however, I get a Visual Basic Error that has no identifying number when I create a macro to add it to a Quick Access button. The template does not open and the error doesn’t tell me what’s wrong. I completed the steps just as I did for the other templates placed on the Qucik Access by using a macro.

    This template does have a field created for the address placement in a text box.. I recreated it using the new Developer field controls. I found out the template won’t work if I protect it to just allow input to forms. I’ve attached the template as a document here, since I can’t attach as a tmeplate, if anyone wants to take a look at it.

    Any help on this one wold be most appreciated. I’ve spent way too long on it already. Why does it work just fine as a straight template? Am awaiting your ideas, Judy

    Viewing 3 reply threads
    Author
    Replies
    • #1238685

      On my Word 2010 Beta machine, I was unable to open the document you attached if I changed its extension to dotm. It did open happily as a docx file though.

      If you want us to have a look at your code then you will need to post the template itself (you can rename the file extension to enable you to load a template here)

    • #1238758

      A template with a macro must be saved as a .dotm file. What you have sent is just a document.

    • #1239008

      Terry, you got me to thinking. I saved the envelope as a dotm and then created my macro to run it and it work. So I’m thinking that the form field in Office 2010 must be a macro. At least it worked this time with out the unidentified VB Error. THe macro I created wasn’t part of the envelope so didn’t think of that. It just called up the template. I’ll test it on a couple of end user PC’s and will report back if it doesn’t work like it did on mine. Thanks again,

    • #1242542

      Good Morning, here’s my final post on this one because a solution was found after hours of working on this crazy envelope macro. As stated above the template worked, but the macro for the envelope didn’t work. This morning I gave myself the task of solving the issue once and for all or forgetting about it. So here’s what happened. I noticed that a macro with another name using the same document as the template worked OK, And just by chance when troubleshooting I ran the macro from the Developer Tab. Guess what the macro named envelope performed correctly and brought in the envelope document..

      So the problem was not with the macro, but with it’s placement on the Quick Access Toolbar. I recreated with the same name on my computer as well as a departmental computer, with the same results. It didn’t work as envelope on the Quick Access Bar. So I recreated on both PC’s naming it envelope1. The macro and shortcut on the Quick Access Bar both worked flawlessly the enveloppe template opened right up.

      So here’s my conclusion after creating an envelope macro on a number of District Attorney PC’s and my own. the word envelope must be a reserved word on the Quick Access Bar in Word 2010 or else a glitch in the programming of the QAT. There was nothing rwrong with my macro, just in the shortcut on the Quick Access Bar. Just in case someone else gets as frustrated as I was about this one. All is well now!

    Viewing 3 reply threads
    Reply To: Word 2010 – Template/Macro with Form Fields

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: