Macros

G

Greg

Wendy,

Yes, provided the users allows your macro to run.

The following line in an autoopen or autonew macro would
do it:

ActiveWindow.View.ShowHiddenText = True

However I would not advise this approach, as most people
wouldn't appreciate someone else rearranging their table.

Another option is a message box providing the
instructions. The following line is an autoopen and
autonew macro might do:

MsgBox "Please navigate through this form using the TAB
key", , "User Instructions"




-----Original Message-----
I am very new to macros. In fact I have never used them.

I have a form that I need to protect and then users can
open it from our shared drive. I would like to insert
a "comment" or "hide text" on the form that tells them to
Tab through the document instead of clicking. However, I
have discovered that if the user does not have the box for
display hidden text on the Tools menu checked, they will
not be able to view my notes.
Is it possible to use a macro that will ensure that
certain functions are turned on when the user opens the
document?
 
G

Greg

Wendy,

Yes and no. I will give you the steps, but a message box
is not the same as a comment :)

I have not found a simple method of providing instructions
on the screen that don't print on the paper. All methods
that I have found requires the use of macros which the
user may or may not elect to run. This includes the
Message Box option that I mentioned. Depending on the
macro security settings on each user's computer, they
could elect bypass your macro and therefore your
instructions.

The message box will simply pop up when the user creates a
new document or opens an existing document created from
that template. When the user clicks "OK," it will
disappear.

Anyway, if you want to proceed, AutoOpen and AutoNew are
macros set to fire when the a document opens (AutoOpen) or
when a new document is created (AutoNew). They are
usually stored in the document template.

Here are the two macros:

AutoNew()
MsgBox "Please navigate through this form using the TAB
key", , "User Instructions"
End Sub

AutoOpen()
MsgBox "Please navigate through this form using the TAB
key", , "User Instructions"
End Sub

To keep is simply, when you paste these macros in your VBA
editor, "MsgBox ... User Instructions" should all be on
one line.

See:
http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm

-----Original Message-----
Greg, Can you give me step by step of how to use the
message box. Is that similar to a comment?
 
G

Greg

Rusty,

I suppose you could do most anything with a macro if the
user allowed it to run. Then again, and this is my humble
opinion, I would would leave the enforcement of corporate
standards to corporate officers and leave Word alone to
process words ;-).
-----Original Message-----
I am looking for a way to tie down what users can do with
Word - trying to force them to use our corporate
standards. Rather than removing the fonts from their PC's
i was wondering if this method of auto open would work for
me - ie on opening the normal template the auto open would
run something to disable or remove the font, and other
menu and toolbar buttons?
 
C

Charles Kenyon

See my response to your post under vba.general.

Some general caveats:
Do not share or force standardization of normal.dot.
Do have good, useful templates for all kinds of documents. Users should not
be creating new documents for standard purposes based upon normal.dot.
--

Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.

Rusty said:
I am looking for a way to tie down what users can do with Word - trying to
force them to use our corporate standards. Rather than removing the fonts
from their PC's i was wondering if this method of auto open would work for
me - ie on opening the normal template the auto open would run something to
disable or remove the font, and other menu and toolbar buttons?
Apologies as I have also posted a similiar new post under Word
Programming.
 
G

Graham Mayor

The place to save the auto... macros is in the *document* template from
which the form is created. That template should not be normal.dot. If you
need to see how to use macro listings,
http://www.gmayor.com/installing_macro.htm will assist you.

The message box option that Greg suggested can be adapted to display your
instructions.

If you call it autoopen, it will run when the document is opened. If you
call it autonew it will run when you create a new document from the
template. If you call it (eg) Instructions - you can call it on entry to the
first field of your form, by selecting it from the field properties.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>><
 
G

Graham Mayor

As others have suggested, this is not a good idea. Supply document templates
that provide the corporate layouts you require and insist that your staff
use them. Leave normal.dot to allow users control over their own workspace.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>><
 

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