ConvertNumbersToText vs Page and Section Breaks

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
 
C

Charles Kenyon

The solution to the page break issue is to not use manual page breaks. Use
page break before formatting. Don't have a solution for the section break
problem. Wish MS would allow section break before formatting, but be careful
what you wish for...
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide


--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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