A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Document properties fields in a template for author/typist



 
 
Thread Tools Display Modes
  #1  
Old May 26th, 2004, 01:58 PM
Stephen Glynn
external usenet poster
 
Posts: n/a
Default Document properties fields in a template for author/typist

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
  #2  
Old May 26th, 2004, 04:51 PM
JBLMorgan
external usenet poster
 
Posts: n/a
Default Document properties fields in a template for author/typist

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.
  #3  
Old May 26th, 2004, 05:45 PM
Stephen Glynn
external usenet poster
 
Posts: n/a
Default Document properties fields in a template for author/typist

JBLMorgan wrote:
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
  #4  
Old May 27th, 2004, 11:17 AM
Doug Robbins - Word MVP
external usenet poster
 
Posts: n/a
Default Document properties fields in a template for author/typist

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




--
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
"Stephen Glynn" wrote in message
...
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


  #5  
Old May 27th, 2004, 01:41 PM
Stephen Glynn
external usenet poster
 
Posts: n/a
Default Document properties fields in a template for author/typist

Doug Robbins - Word MVP wrote:

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
  #6  
Old May 27th, 2004, 02:14 PM
Doug Robbins - Word MVP
external usenet poster
 
Posts: n/a
Default Document properties fields in a template for author/typist

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
"Stephen Glynn" wrote in message
...
Doug Robbins - Word MVP wrote:

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


  #7  
Old May 27th, 2004, 03:51 PM
Stephen Glynn
external usenet poster
 
Posts: n/a
Default Document properties fields in a template for author/typist

Doug Robbins - Word MVP wrote:

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
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 03:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.