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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|