Line numbers in a template (.dot) file

G

Guest

In a prior version of Word, I was able to create a Text Form Field in a
template file (.dot), give it a Numbering attribute from the Formatting
toolbar (or via the Format function) and then lock the document with the
Protect Form function on the Forms toolbar.

Then, when the user opened the document and pasted lines into the Text form
Field, the lines would automatically be line-numbered.

In Word 2003, only the last line of the pasted text is line-numbered (with a
'1'). Nothing I have tried, including creating a macro, has fixed the
problem.
 
W

Word Heretic

G'day Phil1357 <[email protected]>,

Create a numbered style, apply that to the form field.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Phil1357 reckoned:
 
G

Guest

I tried various numbered styles, with the same result.

I have succeeded in creating a macro that works as soon as I enter the
field. I built it by pressing 'home' | shift 'end' | Format | Bullets and
Numbering | [1. 2. 3.] | Customize | [the indentation I wanted]. After I
assign the macro to Properties of the text form field and relock the form, a
list pasted into that field numbers correctly, but inserts the list before
the field, thus leaving the empty field showing as a small highlighed area
after the last entry in the list. I don't now recall whether I was
successful in deleting that field, but it is a minor issue.

When I return to work Monday, I will try to determine why, last week, a
macro I had applied on exiting the field did not work for the two users who
tried it; presumably, this new macro will not work for them either. The
users obtain the file on our Intranet as a .dot file. I opened it and looked
for the macro; it does exist when that file is opened.
 
G

Guest

To clarify, I created a text field in a .dot file that I using the Forms
toolbar, formatted it with numbering and locked the document. When the user
opens the document from our Intranet and pastes a list into the field,
instead of a numbered list, it looks like the following:

abc
def
1. ghi
 
W

Word Heretic

G'day Phil1357 <[email protected]>,

The OnExit doesn't fire if the author exits the field using the mouse
to select an unprotected section of the document.

You could also intecept the EditPaste command and do a paste special
as text.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Phil1357 reckoned:
I tried various numbered styles, with the same result.

I have succeeded in creating a macro that works as soon as I enter the
field. I built it by pressing 'home' | shift 'end' | Format | Bullets and
Numbering | [1. 2. 3.] | Customize | [the indentation I wanted]. After I
assign the macro to Properties of the text form field and relock the form, a
list pasted into that field numbers correctly, but inserts the list before
the field, thus leaving the empty field showing as a small highlighed area
after the last entry in the list. I don't now recall whether I was
successful in deleting that field, but it is a minor issue.

When I return to work Monday, I will try to determine why, last week, a
macro I had applied on exiting the field did not work for the two users who
tried it; presumably, this new macro will not work for them either. The
users obtain the file on our Intranet as a .dot file. I opened it and looked
for the macro; it does exist when that file is opened.

Word Heretic said:
G'day Phil1357 <[email protected]>,

Create a numbered style, apply that to the form field.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Phil1357 reckoned:
 
G

Guest

Thanks, Steve--I will look at what you suggested; however, in the meantime,
however, I believe the field is now working. The difference may be that I
saved the file as a .doc file instead of .dot, and the macro is now invoked
upon entry to the field rather than exit.

All the document's fields are text boxes or drop-down lists from the Forms
toolbar.

My macro, consisting of [home key] [shift end key] format | bullets and
numbering | [various number, font and indentation settings] now works for the
user who tried it for me. I don't recall whether, if with everything I
tried, I didn't actually have the user create his own macro, but I'll find
out when another user tries it.

Word Heretic said:
G'day Phil1357 <[email protected]>,

The OnExit doesn't fire if the author exits the field using the mouse
to select an unprotected section of the document.

You could also intecept the EditPaste command and do a paste special
as text.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Phil1357 reckoned:
I tried various numbered styles, with the same result.

I have succeeded in creating a macro that works as soon as I enter the
field. I built it by pressing 'home' | shift 'end' | Format | Bullets and
Numbering | [1. 2. 3.] | Customize | [the indentation I wanted]. After I
assign the macro to Properties of the text form field and relock the form, a
list pasted into that field numbers correctly, but inserts the list before
the field, thus leaving the empty field showing as a small highlighed area
after the last entry in the list. I don't now recall whether I was
successful in deleting that field, but it is a minor issue.

When I return to work Monday, I will try to determine why, last week, a
macro I had applied on exiting the field did not work for the two users who
tried it; presumably, this new macro will not work for them either. The
users obtain the file on our Intranet as a .dot file. I opened it and looked
for the macro; it does exist when that file is opened.

Word Heretic said:
G'day Phil1357 <[email protected]>,

Create a numbered style, apply that to the form field.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Phil1357 reckoned:

In a prior version of Word, I was able to create a Text Form Field in a
template file (.dot), give it a Numbering attribute from the Formatting
toolbar (or via the Format function) and then lock the document with the
Protect Form function on the Forms toolbar.

Then, when the user opened the document and pasted lines into the Text form
Field, the lines would automatically be line-numbered.

In Word 2003, only the last line of the pasted text is line-numbered (with a
'1'). Nothing I have tried, including creating a macro, has fixed the
problem.
 
G

Guest

G'day Steve,

I'm back to square one, on account of complexities of exporting macros to
the users. I will now either solve the problem with formatting, or the users
must line-number their lists before pasting them.

Word Heretic said:
G'day Phil1357 <[email protected]>,

The OnExit doesn't fire if the author exits the field using the mouse
to select an unprotected section of the document.

You could also intecept the EditPaste command and do a paste special
as text.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Phil1357 reckoned:
I tried various numbered styles, with the same result.

I have succeeded in creating a macro that works as soon as I enter the
field. I built it by pressing 'home' | shift 'end' | Format | Bullets and
Numbering | [1. 2. 3.] | Customize | [the indentation I wanted]. After I
assign the macro to Properties of the text form field and relock the form, a
list pasted into that field numbers correctly, but inserts the list before
the field, thus leaving the empty field showing as a small highlighed area
after the last entry in the list. I don't now recall whether I was
successful in deleting that field, but it is a minor issue.

When I return to work Monday, I will try to determine why, last week, a
macro I had applied on exiting the field did not work for the two users who
tried it; presumably, this new macro will not work for them either. The
users obtain the file on our Intranet as a .dot file. I opened it and looked
for the macro; it does exist when that file is opened.

Word Heretic said:
G'day Phil1357 <[email protected]>,

Create a numbered style, apply that to the form field.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Phil1357 reckoned:

In a prior version of Word, I was able to create a Text Form Field in a
template file (.dot), give it a Numbering attribute from the Formatting
toolbar (or via the Format function) and then lock the document with the
Protect Form function on the Forms toolbar.

Then, when the user opened the document and pasted lines into the Text form
Field, the lines would automatically be line-numbered.

In Word 2003, only the last line of the pasted text is line-numbered (with a
'1'). Nothing I have tried, including creating a macro, has fixed the
problem.
 
G

Guest

Hi Steve,

I finally settled on line-numbering both the protected field and the line
above it, starting with zero. It looks odd, but it works. I should send a
comment to Microsoft about the issue.

Word Heretic said:
G'day Phil1357 <[email protected]>,

The OnExit doesn't fire if the author exits the field using the mouse
to select an unprotected section of the document.

You could also intecept the EditPaste command and do a paste special
as text.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Phil1357 reckoned:
I tried various numbered styles, with the same result.

I have succeeded in creating a macro that works as soon as I enter the
field. I built it by pressing 'home' | shift 'end' | Format | Bullets and
Numbering | [1. 2. 3.] | Customize | [the indentation I wanted]. After I
assign the macro to Properties of the text form field and relock the form, a
list pasted into that field numbers correctly, but inserts the list before
the field, thus leaving the empty field showing as a small highlighed area
after the last entry in the list. I don't now recall whether I was
successful in deleting that field, but it is a minor issue.

When I return to work Monday, I will try to determine why, last week, a
macro I had applied on exiting the field did not work for the two users who
tried it; presumably, this new macro will not work for them either. The
users obtain the file on our Intranet as a .dot file. I opened it and looked
for the macro; it does exist when that file is opened.

Word Heretic said:
G'day Phil1357 <[email protected]>,

Create a numbered style, apply that to the form field.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Phil1357 reckoned:

In a prior version of Word, I was able to create a Text Form Field in a
template file (.dot), give it a Numbering attribute from the Formatting
toolbar (or via the Format function) and then lock the document with the
Protect Form function on the Forms toolbar.

Then, when the user opened the document and pasted lines into the Text form
Field, the lines would automatically be line-numbered.

In Word 2003, only the last line of the pasted text is line-numbered (with a
'1'). Nothing I have tried, including creating a macro, has fixed the
problem.
 

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