Add field to the document problem

G

Greg

RAISA,

You should be able to do this with FIELDS and existing
document properties.

Your template needs to contain a { CREATEDATE } field and
a { AUTHOR } field. You can designate the author with
File>Properties>Summary>Author. This is by default the
value set in Tools>Options>User Information Name. Update
the fields with CTRL+a and F9.

If you want a macro, this should work:

Sub AutoNew()
Dim Author As String
Author = InputBox("Enter document author", "Author", "Me")
ActiveDocument.BuiltInDocumentProperties("Author").Value _
= Author
ActiveDocument.Fields.Update
End Sub
 
G

Greg Maxey

RAISA,

Forget about Insert>Field.

Just open your template type CREATEDATE where you want the date to appear
and tyep AUTHOR where you want the author to appear. Select CREATEDATE and
press CTRL+F9. Do the same for Author. Press ALT+F9 to toggle the field
code to text.

The AutoNew I provided will promt for and set the Author value. You don't
want to use a DATE field. Use a CREATEDATE field. It will hold the value
that the document is created on.
 

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