Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jan 2004
    Location
    Mount Prospect, Illinois
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OrganizerCopy not copying all attributes of style? (2003)

    Can anyone think of a reason why the OrganizerCopy VBA command would copy some of a style's properties but not all?? It appears that the Font attributes are fine and dandy, but the tabs and paragraph format aren't getting overwritten -- the document's previous settings are staying set. This is causing much grief.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: OrganizerCopy not copying all attributes of style? (2003)

    When using the Organizer interactively, the recommendation is to copy each style at least three times, you might try that using code too.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2004
    Location
    Mount Prospect, Illinois
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: OrganizerCopy not copying all attributes of style? (2003)

    Eeewww. Three times? Not what I was hoping to find out. I was hoping you'd say, "Oh, it's a sign of a corrupted file, try saving it out to XML and reading it back in again." Most of the time, my code works fine.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: OrganizerCopy not copying all attributes of style? (2003)

    The idea behind copying more than once is that properties that a style inherits from another style don't always get copied correctly the first time. Copying three times is apparently sufficient to make sure that all dependencies between styles have been copied.

  5. #5
    2 Star Lounger
    Join Date
    Jan 2004
    Location
    Mount Prospect, Illinois
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: OrganizerCopy not copying all attributes of style? (2003)

    Follow-up: No, it isn't sufficient, even run three times. OrganizerCopy does not appear to copy the LeftIndent, RightIndent and Tab Stops. I've got code already to do this manually, but due to a change in my specs, I wasn't running that block of code,

    On the other hand, I just found the Document.CopyStylesFromTemplate method -- it can't be limited to specific styles, but it's faster, and simpler (but will need to wait for my next release)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •