Macro to disable Auto Date

I

Ilene

We do not want users to be able to use the auto date feature. Is there a way
to disable it using VBA?

Office XP
 
C

Chuck Henrich

What do you mean by "auto date" feature? Are you talking about
autoformatting dates? If so you can disable that with:
Options.AutoFormatAsYouTypeApplyDates = True

If you're talking about disabling the date autotext tool tip you can use:
Application.DisplayAutoCompleteTips = False
but that doesn't discriminate between autotext and dates - the tooltips
won't show for either.

You could put either line in an AutoExec macro to have it take effect when
the user starts Word.
 
I

Ilene

sorry, i wasn't clear! we do not want them to be able to use a date code
which updates. ilene
 
C

Chuck Henrich

It looks like your options are limited.

Any VBA solution would need to trap the result of the user activating the
wdDialogInsertDateTime dialog or the wdDialogInsertField dialog. It's easy
enough to invoke the wdDialogInsertField dialog using VBA, but setting up
traps for them would appear to require some pretty fancy coding if it's
possible at all (I may be very wrong).

You could remove the "Field" and "Date and time" items from the Insert menu
and replace them with your own dialogs. Replacing the wdDialogInsertField
dialog would be a lot of work (!!) but intercepting the
wdDialogInsertDateTime dialog is easier:

With Dialogs(wdDialogInsertDateTime)
.Display
.InsertAsField = False
.Execute
End With

HTH
 
C

Charles Kenyon

1) Create templates that already have a CreateDate field in them for your
users to use.
2) Remove the Insert > Date command from the menus.

These should stop 95% of your users, but they will probably save documents
with the CreateDate field and be upset when reusing them that the date
doesn't update.
--
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.
 

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