programming language

G

Guest

I am creating a document that will be a template for others to open and
specify specific things within the letter but not change others. When
someone opens it, they will find a protected document with a drop down box.
This drop down box will have several options with a macro upon exit. This
macro needs to:
1. unprotect the document
2. insert the proper file dependent on the drop down choice made
3. make the drop down box disappear
4. reprotect the document.

Is this even possible? If so, where would I find the language necessary to
do so. I was trying to record a macro for each step in order to familiarize
myself with the language, however, when I protect the document, the recording
option goes away.
 
E

Ed

Sounds like a template with a UserForm that shows on Open (or maybe New),
with code to search a directory and list the files in a drop down list
control. When you hit the "Go" (or whatever) button, it grabs the chosen
file, inserts it, saves as a new doc, and adds protection. All of this is
very do-able using VBA code.

I'd recommend getting a good book on VBA for your version of Word - I have
Word 2000 Developer's Handbook, which is pretty weighty but full. You can
also simply open Word, hit ALT+F11 to open the VBA editor window, and use F1
to read the Help files about UserForms, Controls, document protection, and
more. You can also Google this newsgroup and read a ton of posts on how
this can be done.

Ed
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?Ym9uemFpYmFuYW5h?=,
I am creating a document that will be a template for others to open and
specify specific things within the letter but not change others. When
someone opens it, they will find a protected document with a drop down box.
This drop down box will have several options with a macro upon exit. This
macro needs to:
1. unprotect the document
2. insert the proper file dependent on the drop down choice made
3. make the drop down box disappear
4. reprotect the document.

Is this even possible? If so, where would I find the language necessary to
do so. I was trying to record a macro for each step in order to familiarize
myself with the language, however, when I protect the document, the recording
option goes away.
You should be able to use this approach for bits and pieces. The commands for
protect/unprotect you'll find in the Forms section of my website.

The better place to pursue this discussion would be one of the word.vba
newsgroups. As this group is intended for end-users you're less likely to find a
lot of people who can help you.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

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