Customized field

D

Daniel

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.
 
C

Charles Kenyon

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.
 

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