J
joelfinkle
In Word 2002 and 2003 (and I'm assuming earlier versions), the VBA method
ActiveDocument.ConvertNumbersToText
will have incorrect and unpleasant behavior when a numbered paragraph starts
with a section or page break.
After the method executes, the number, converted to text, will be placed
ahead of the page break, e.g.
1. -> -------------Page Break----------------
Introduction
when what you wanted to happen is
-------------Page Break----------------
1. -> Introduction
The root of this problem is that Page and Section Breaks are not their 'own
paragraphs' but reside within other paragraphs (which has all kinds of nasty
traps for the programmer). With a section break, I have seen TWO numbers
appear: one before the break, one after.
This was discovered while developing tools to assist users of Acrobat 5.0
and 6.0. Those versions of Acrobat are able to convert Word Heading styles
into Acrobat bookmarks, but lose the automatic numbering on the bookmarks.
ConvertNumbersToText is the onlly way to solve this issue (aside from
upgrading to 7.0), but creates additional problems.
Using "Page Break Before" isn't an option because most authors can't find
that and will have put hard page breaks in anyway.
This should be considered a bug, and a serious one at that. This violates
the principle of least surprise, and really really doesn't do what authors
would want.
Joel Finkle
Director, Product Strategy
Image Solutions, Inc.
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/com...a649ddf5&dg=microsoft.public.word.vba.general
ActiveDocument.ConvertNumbersToText
will have incorrect and unpleasant behavior when a numbered paragraph starts
with a section or page break.
After the method executes, the number, converted to text, will be placed
ahead of the page break, e.g.
1. -> -------------Page Break----------------
Introduction
when what you wanted to happen is
-------------Page Break----------------
1. -> Introduction
The root of this problem is that Page and Section Breaks are not their 'own
paragraphs' but reside within other paragraphs (which has all kinds of nasty
traps for the programmer). With a section break, I have seen TWO numbers
appear: one before the break, one after.
This was discovered while developing tools to assist users of Acrobat 5.0
and 6.0. Those versions of Acrobat are able to convert Word Heading styles
into Acrobat bookmarks, but lose the automatic numbering on the bookmarks.
ConvertNumbersToText is the onlly way to solve this issue (aside from
upgrading to 7.0), but creates additional problems.
Using "Page Break Before" isn't an option because most authors can't find
that and will have put hard page breaks in anyway.
This should be considered a bug, and a serious one at that. This violates
the principle of least surprise, and really really doesn't do what authors
would want.
Joel Finkle
Director, Product Strategy
Image Solutions, Inc.
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/com...a649ddf5&dg=microsoft.public.word.vba.general