Re: styles not wokring in huge document

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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@xxxxxxxxxxxxx, "ByteMe"
<ByteMe@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:


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

--

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

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

.



Relevant Pages

  • Re: How to set Excel "Range" in VB6?
    ... >I thought I had the reference, but a look at the References says I don't. ... It's a conflict ... >conflicts that even late binding won't resolve. ... >> When working with VBA in Excel, the Excel object library is intrinsic. ...
    (microsoft.public.vb.general.discussion)
  • Re: Adding and Changing CustomDocumentProperties from VBA on oth
    ... In tools references, create a reference to it as shown in the article. ... Dim oSummProps As DSOFile.SummaryProperties ... Tom Ogilvy "VBA Dabbler" wrote in message ... > I've downloaded the DLL - it looks like you have to be in an application> development environment, like C++, VB, etc. I'm not sure how this can be> used in Visual Basic for Applications (VBA). ...
    (microsoft.public.excel.programming)
  • Re: Last saved by
    ... The code I posted was VBA code, ... Find your project workbook in the Project Explorer, select it, then go ... Optional Reference As Excel.Range) As Variant ...
    (microsoft.public.excel.programming)
  • Re: Extracting $ Data from Alpha Field?
    ... The definitive reference document for the VBA functions is ... >*This says stop looking when you get to the comma? ... These two are both part of a single expression that is the ...
    (microsoft.public.access.queries)
  • Re: Different VBA code behaviour in MDB and MDE
    ... By running the same program in MDE the VBA code in the form gives the ... 'wordt het vinkje in de tickbox van het reference form in VBA uitgezet. ... Dim refCurr As Reference ...
    (comp.databases.ms-access)