none
Paragraph.ListAdvanceTo replacement for Word 2003 RRS feed

  • Question

  • I have this code in Word 2007 VBA

    ActiveDocument.Paragraphs(intKey + 1).ListAdvanceTo _
    
     ActiveDocument.Paragraphs(intKey + 1).Range.ListFormat.ListValue + 1
    
    
    
    

     

    ActiveDocument contains a numbered list. If a paragraph in the  list meets certain condition I need to increase its number, so for example:

    6) AAA

    7) BBB

    becomes:

    6) AAA

    8) BBB

    I was able to make it work by increasing the paragraph Range.ListFormat.ListValue by one and pass the new value to Paragraph.ListAdvanceTo. However, Paragraph.ListAdvanceTo was introduced for Word 2007 so the above code causes a compilation error in Word 2003. Is there an equivalent procedure to advance list numbers that would work for Word 2003?

    Thank you in advance.


    Uros Calakovic
    • Edited by Anonimista Thursday, March 17, 2011 4:46 PM typo
    Thursday, March 17, 2011 4:45 PM

Answers

  • Hi urkec,

    Thanks for posting in the MSDN Forum.

    Based on my experience and research, that we’re not able to do that in Word 2003. I’m not able to find any properties or methods in the Word 2003 Library to support your idea. Thanks for your understanding.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Anonimista Monday, March 21, 2011 2:38 PM
    Monday, March 21, 2011 9:34 AM
    Moderator

All replies

  • Hi urkec,

    Thanks for posting in the MSDN Forum.

    Based on my experience and research, that we’re not able to do that in Word 2003. I’m not able to find any properties or methods in the Word 2003 Library to support your idea. Thanks for your understanding.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Anonimista Monday, March 21, 2011 2:38 PM
    Monday, March 21, 2011 9:34 AM
    Moderator
  • Thank you for your reply, I guess I'll have to find another way to make my macro Word 2003 compatible.
    Uros Calakovic
    Monday, March 21, 2011 2:38 PM