Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2005

Tip: Looking for answers? Try searching our database.

ConvertNumbersToText vs Page and Section Breaks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
joelfinkle - 22 Nov 2005 14:49 GMT
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.
Charles Kenyon - 22 Nov 2005 20:31 GMT
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...
Signature

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

See also the MVP FAQ: http://word.mvps.org/FAQs/ which is awesome!
--------- --------- --------- --------- --------- ---------
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.

> In Word 2002 and 2003 (and I'm assuming earlier versions), the VBA method
> ActiveDocument.ConvertNumbersToText
[quoted text clipped - 55 lines]
>
> http://www.microsoft.com/office/community/en-us/default.mspx?mid=d7f0a8cd-de7d-4
3d6-9032-a23aa649ddf5&dg=microsoft.public.word.vba.general
 
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.