Document properties fields in a template for author/typist

  • Thread starter Thread starter Stephen Glynn
  • Start date Start date
S

Stephen Glynn

I've seen this done but never quite worked out how it works.

Scenario: firm of solicitors has lawyers and legal secretaries who do
the typing for individual lawyers. One secretary will normally do all
the typing for one or two lawyers, but obviously one of the other
secretaries does their typing when they're on holiday.

Secretary turns up at work, logs on (or enters a username in a
stand-alone installation). Up pops a list of lawyers and the
secretary identifies who dictated the tape she's working on at present.

This sets the Author and typist fields in the document properties, which
then appear in the header or footer.

I know how to get the fields into the header or footer, but how would I
get Word to prompt, using a default setting for both fields, for the
document's Author and typist each time you open a new document using
that particular template?

Steve
 
I'd post this in the programming section because I know it can be done in a macro. Don't know what version of Word you're on so it's hard to tell you exactly how without knowing that.
 
JBLMorgan said:
I'd post this in the programming section because I know it can be done in a macro. Don't know what version of Word you're on so it's hard to tell you exactly how without knowing that.

Thanks. I'll do that. It's Word 2000, for reference.

Steve
 
Doug said:
See the article "How to create a Userform" at:

http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm

and "How to get the username of the current user" at:

http://word.mvps.org/FAQs/MacrosVBA/GetCurUserName.htm

Thanks. I've tried to follow the instructions on "How to create a
Userform" with the following code:

Private Sub CommandButton1_Click()
With ActiveDocument
..Bookmarks("Author").Range_
..InsertBefore Author
..Bookmarks("Typist").Range_
..InsertBefore Typist
End With
UserForm1.Hide


End Sub

and it fails at the first "Range", giving me the error message "Method
or data member not found (Error 461)". I've checked the spelling of
both the bookmarks and the names of the the text boxes.

What have I done wrong?

Steve
 
Hi Stephen,

I think your problem might be with the line break character after .Range

Delete the underscore and the following carriage return so that you get

..Bookmarks("Author").Range.InsertBefore Author

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
Doug said:
Hi Stephen,

I think your problem might be with the line break character after .Range

Delete the underscore and the following carriage return so that you get

.Bookmarks("Author").Range.InsertBefore Author

Thanks -- worked like a charm!

Steve
 
Back
Top