Manipulate Title Bar

C

Chrischik

Hi all,
I would like my title bar in word to always pick up the login id of the user.
eg. if I log into my pc as Chris it will take as a default title "Chris".
Thanks,

Chris
 
J

Jonathan West

Hi Chris,

You can set the default caption to whatever you want by setting the
Application.Caption property.

This article shows you how to get the current user name, so that you can set
the caption to what you want.:

How to get the username of the current user
http://word.mvps.org/FAQs/MacrosVBA/GetCurUserName.htm

To get the caption set automatically when you start Word, put the code into
a macro called AutoExec. This macro should in turn be placed in a separate
template and put into Word's startup folder. This article explains about
distributing macros in templates.

Distributing macros to other users
http://word.mvps.org/FAQs/MacrosVBA/DistributeMacros.htm

Beware that if yiou change the application caption in this way, so that
"Microsoft Word" is no longer part of the caption, it is possible that some
other applications which interact with Word will not work right, id they
rely on being able to recognise the caption. This isn't likely to be a
problem, but it isn't impossible that it could trip you up.
 

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