none
This CHANGES Active Document, BUT does it affect all other documents with a Heading2? From now on? Ones Saved before this code runs. Or only affects documents created after this code runs? Like does this also change the Normal Template? RRS feed

  • Question

  • This example modifies the Heading 2 style for the active document. Paragraphs formatted with this style are indented to the first tab stop and double-spaced.

    VBA

    With ActiveDocument.Styles(wdStyleHeading2).ParagraphFormat

     .TabIndent(1)

     .Space2

    End With

    Have not been able to find answer to my question.  Found ways to change various things, but not limits of change.

    Thanks for any info on this.

    as for the formatting of this question, I have not found why font changes from "End With" to "Have not...." to "Thanks..." to "as for....".

    only bit of this I do know is, from the start of text to "End With" is a copy from a word doc, copy is of a MSDN web page. And my word doc had this formatting.

    Mark J


    Mark J

    Saturday, October 15, 2016 3:45 AM

Answers

  • The code will only affect the document that is the active document when you run the code. It will not affect any other document, nor any template (unless you have a template open as the active document when you run the code, of course).

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by PuzzledByWord Monday, October 17, 2016 6:47 AM
    Saturday, October 15, 2016 8:49 AM

All replies

  • The code will only affect the document that is the active document when you run the code. It will not affect any other document, nor any template (unless you have a template open as the active document when you run the code, of course).

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by PuzzledByWord Monday, October 17, 2016 6:47 AM
    Saturday, October 15, 2016 8:49 AM
  • Hans Vogelaar,

    Thanks,

    I am learning.

    This bit gets me closer to next fix of code.

    Thanks again

    Mark J


    Mark J

    Monday, October 17, 2016 6:49 AM