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 / Document Management / January 2007

Tip: Looking for answers? Try searching our database.

styles not wokring in huge document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ByteMe - 22 Jan 2007 10:52 GMT
Hi,

I'm trying to create a huge document that can't be splitted in MS Word 2000
using VBA.
The document is about 130 pages, containing just text and titles, and has
about 10 styles which are used plenty.

At some point when creating the document, Word doesn't accept styles anymore.
(some style will work longer then other). Created a break in VBA on that
place, and tried to do it manualy in Word; Same result. He won't change the
Style.

Is there a known limit on how many characters you can fit into a style or
how many times you can apply a style?

Thx
Jezebel - 22 Jan 2007 12:00 GMT
130 pages is not huge. I've used VBA to create documents that were well into
the thousands of pages (largest was over 10,000 pages), and the styles all
worked exactly as expected.

So at a guess, you've got something else altogether going wrong. Perhaps if
you posted the code?

> Hi,
>
[quoted text clipped - 15 lines]
>
> Thx
Stefan Blom - 22 Jan 2007 12:19 GMT
In what way doesn't Word "accept" the styles? What happens?

Are you working with selections (not so good)? With ranges
(preferable)? What code is used?

Signature

Stefan Blom
Microsoft Word MVP

> Hi,
>
[quoted text clipped - 12 lines]
>
> Thx
ByteMe - 22 Jan 2007 13:20 GMT
Well, when running the script, he suddenly doesn't apply the style anymore.
(Same code in a for-loop)

When I skip the creation of the first pages, the application of styles is
also shifted.
Meaning that its not related to the text itself.

When the document is created, i can't select a piece of text and apply a
style.
The little styles-dropdownbox goes back to the actual style.

Thanks for your help
John McGhie [MVP - Word and Word Macintosh] - 23 Jan 2007 07:07 GMT
You have a conflict occurring within your styles.  It may be a circular
reference in the "Based On" property.

Doing this rapidly many hundreds of times in VBA causes the style table
within the document to corrupt.

After that, you will be unable to write to the style table, and thus will be
unable to apply any styles.

If you "Maggie" the document (create a new document and copy all except the
last paragraph mark to it) that will write a new style table, and you may
then be able to see what is wrong with your styles.

Sorry:  Doing this with VBA is very intricate: you have to get everything
exactly correct or you get these problems.

It is most likely that the problem is occurring in the module that creates
the style, not in the module that applies the style.

Cheers

On 23/1/07 12:20 AM, in article
017E04E0-30EB-4AF3-9631-27D76597CF8B@microsoft.com, "ByteMe"

> Well, when running the script, he suddenly doesn't apply the style anymore.
> (Same code in a for-loop)
[quoted text clipped - 8 lines]
>
> Thanks for your help

Signature

Please reply to the newsgroup to maintain the thread.  Please do not email
me unless I ask you to.

John McGhie <john@mcghie.name>
Microsoft MVP, Word and Word for Macintosh.  Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410

 
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



©2009 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.