Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Alternative to macros for creating menu-driven functions?
I've developed some nice little macros in a letter template which add/remove
our company logo, add/remove footer text, shift the recipient's address into the proper position when creating a letter which will be sent in a window-envelope, etc. These functions are called from custom menus in Word which call the respective macros stored in a module within the template/document. Two problems with our "Macro" solution: 1.) Letters created with this template are sometimes e-mailed externally. We don't want recipients to have any of the programmed functionality, just the text. Basically, our employees need the programmed functionality as long as the documents are in-house. External recipients do not. 2.) Macros are being detected internal and external mail servers as "Macro viruses". I'd rather not have the authors remember to delete/remove macros before e-mailing Word files. I've seen some programs (like PDFMaker) in Word's tool bar, and I noticed that it is using some of its own macros, but the macros are stored in each PC's local "Microsoft Office/Office/startup" folder, and not stored with the document itself. After briefly experimenting with the startup folder, I couldn't duplicate this "local only" functionality. Is there some other technology required such as COM or ActiveX? Or, does anyone recommend using Visual Studio Tools for Office instead of Word's VBA environment? Is there an advantage? |
#2
|
|||
|
|||
Don't save the macros in the document. Save them in the document template.
If they are not in the document, they will not be mailed with it. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Widmer wrote: I've developed some nice little macros in a letter template which add/remove our company logo, add/remove footer text, shift the recipient's address into the proper position when creating a letter which will be sent in a window-envelope, etc. These functions are called from custom menus in Word which call the respective macros stored in a module within the template/document. Two problems with our "Macro" solution: 1.) Letters created with this template are sometimes e-mailed externally. We don't want recipients to have any of the programmed functionality, just the text. Basically, our employees need the programmed functionality as long as the documents are in-house. External recipients do not. 2.) Macros are being detected internal and external mail servers as "Macro viruses". I'd rather not have the authors remember to delete/remove macros before e-mailing Word files. I've seen some programs (like PDFMaker) in Word's tool bar, and I noticed that it is using some of its own macros, but the macros are stored in each PC's local "Microsoft Office/Office/startup" folder, and not stored with the document itself. After briefly experimenting with the startup folder, I couldn't duplicate this "local only" functionality. Is there some other technology required such as COM or ActiveX? Or, does anyone recommend using Visual Studio Tools for Office instead of Word's VBA environment? Is there an advantage? |
#3
|
|||
|
|||
Don't save the macros in the document. Save them in the document template.
If they are not in the document, they will not be mailed with it. Thank you, your advice helped fix my e-mail problem. Now I need to solve a field resetting problem: In the template, I have included macros which prevent the fields from resetting when the doc is protected/unprotected, by the user or from other template macro code. I got the code he http://word.mvps.org/FAQs/MacrosVBA/...lfResetOff.htm . This means that if we, for example, send our doc to a lawyer to be edited, the macro is no longer with the doc. If s/he clicks on unprotect/protect (for any reason, including an accident), all the text in the fields will reset. I'd like to save the file as formatted text only, without saving the fields themselves in order to prevent the fields from resetting. Is this possible or is there a better known solution? |
#4
|
|||
|
|||
Put a password on the protection so that it cannot be unprotected
accidentally. There is nothing to stop the user inserting the form into a new document to remove the protection, but this then becomes more than an 'accident'. If you want to deter editing once the form is completed and shipped out, then output to PDF (you'll need more software) and send the PDF version. This will fix it for all but the most determined. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Widmer wrote: Don't save the macros in the document. Save them in the document template. If they are not in the document, they will not be mailed with it. Thank you, your advice helped fix my e-mail problem. Now I need to solve a field resetting problem: In the template, I have included macros which prevent the fields from resetting when the doc is protected/unprotected, by the user or from other template macro code. I got the code he http://word.mvps.org/FAQs/MacrosVBA/...lfResetOff.htm . This means that if we, for example, send our doc to a lawyer to be edited, the macro is no longer with the doc. If s/he clicks on unprotect/protect (for any reason, including an accident), all the text in the fields will reset. I'd like to save the file as formatted text only, without saving the fields themselves in order to prevent the fields from resetting. Is this possible or is there a better known solution? |
#5
|
|||
|
|||
Put a password on the protection so that it cannot be unprotected
accidentally. There is nothing to stop the user inserting the form into a new document to remove the protection, but this then becomes more than an 'accident'. Thank you very much for your advice. |
#6
|
|||
|
|||
Widmer wrote:
Put a password on the protection so that it cannot be unprotected accidentally. There is nothing to stop the user inserting the form into a new document to remove the protection, but this then becomes more than an 'accident'. Thank you very much for your advice. You are welcome -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org |