Customized field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I currently have inserted the field "filename". However, I only want the
first 3 characters of the file name. Typically I would use a
right(filename,3)... or something similar to extract what I need. However
this does not seem to work in word 2000. What solutions exists? Is this
something that must be done using coding (VBA)?

If VBA is the only solution, how can I send the result of my coding (hence a
variable) to a predetermined place on the cover page whenever the document is
loaded?

Thanks,

Daniel P.
 
VBA is required. You can use this to set a document property or document
variable in Word and use a DocProperty or DocVariable field to insert it in
your document. You will need AutoOpen coding to refresh the variable and to
refresh the field. This will not change if you save to a different name
unless you reopen the document. If you need to update immediately upon a
save, you would need to also trap the save and saveas commands.
--

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.
 
Back
Top