Forum Discussion

alphakeverest's avatar
alphakeverest
Copper Contributor
Mar 30, 2021

Indent in Multi-Level List

Hi!

Can you tell me how to record intend increase and decrease in a multilevel list through Macros?

 

 

6 Replies

  • alphakeverest 

     

    You can use the following commands:

     

    Selection.Range.ListFormat.ListIndent  'indents/demotes the level in the selection

    Selection.Range.ListFormat.ListOutdent  'outdents/promotes the level in the selection

     

     

      • Stefan_Blom's avatar
        Stefan_Blom
        MVP

        alphakeverest 

         

        I'm glad I could help.

          

        Note that the comments I added (starting with single quotation marks) are not part of the code. They are not supposed to wrap, but I see that they do here (when I tried to format the code samples as code samples, the problem became worse). You can just delete the 'indents/demotes the level in the selection and 'outdents/promotes the level in the selection parts.

  • hansleroy's avatar
    hansleroy
    Iron Contributor
    Hi, There is better than a macro: there are shortcuts. Ctrl+M increases the indentation, Ctrl+Shift+M decreases it. Kind regards Hans
    • alphakeverest's avatar
      alphakeverest
      Copper Contributor
      Thank you so much but the thing is, it is required only through Macros. Is there any way of doing this in VBA Macros?

Resources