Indent in Multi-Level List

%3CLINGO-SUB%20id%3D%22lingo-sub-2244321%22%20slang%3D%22en-US%22%3EIndent%20in%20Multi-Level%20List%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2244321%22%20slang%3D%22en-US%22%3E%3CP%3EHi!%3C%2FP%3E%3CP%3ECan%20you%20tell%20me%20how%20to%20record%20%3CSTRONG%3Eintend%20increase%20%3C%2FSTRONG%3Eand%3CSTRONG%3E%20decrease%3C%2FSTRONG%3E%20in%20a%20multilevel%20list%20through%20Macros%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Capture.PNG%22%20style%3D%22width%3A%20244px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F268224i6D0196F7E9616A13%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Capture.PNG%22%20alt%3D%22Capture.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2244321%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWord%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2244758%22%20slang%3D%22en-US%22%3ERE%3A%20Indent%20in%20Multi-Level%20List%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2244758%22%20slang%3D%22en-US%22%3EHi%2C%20There%20is%20better%20than%20a%20macro%3A%20there%20are%20shortcuts.%20Ctrl%2BM%20increases%20the%20indentation%2C%20Ctrl%2BShift%2BM%20decreases%20it.%20Kind%20regards%20Hans%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi!

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

 

 

Capture.PNG

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

@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
Thank you so much. It worked

@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.

@Stefan_Blom
Yes I already knew about how to comment in visual basic so I just copied only the part prior to this single quotation mark.
Once again, thanks a bunch.