expand / collapse doesn't work on heading if it's set later

%3CLINGO-SUB%20id%3D%22lingo-sub-1928753%22%20slang%3D%22en-US%22%3Eexpand%20%2F%20collapse%20doesn't%20work%20on%20heading%20if%20it's%20set%20later%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1928753%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20sorry%20if%20the%20subject%20is%20hard%20to%20understand%20I'll%20try%20to%20explain%20it%20as%20well%20as%20I%20can.%26nbsp%3B%20So%20when%20I%20am%20using%20%3CFONT%20color%3D%22%233366FF%22%3EH1%3C%2FFONT%3E%20I%20will%20refer%20to%20the%20(Heading%201)%20style%2C%20%3CFONT%20color%3D%22%23FF6600%22%3EH2%3C%2FFONT%3E%20for%20the%20(Heading%202)%2C%20and%20%3CFONT%20color%3D%22%23339966%22%3Enormal%3C%2FFONT%3E%26nbsp%3Bfor%20(normal%20style).%20Assume%20we%20are%20creating%20a%20new%20.docx%20file%2C%20in%20the%20start%20I%20choose%20%3CFONT%20color%3D%22%233366FF%22%3EH1%26nbsp%3B%3C%2FFONT%3EI%20type%20my%20Heading%2C%20and%20then%20I%20press%20enter.%20Now%20there%20are%20two%20sides%20to%20this%20problem%2C%20the%20first%20side%20can%20happen%20if%20I%20choose%20%3CFONT%20color%3D%22%23FF6600%22%3EH2%3C%2FFONT%3E%20and%20start%20typing%20(for%20example%20%22Way%201%20%5Bfinding%20a%20nice%20spot%5D%22%20)%2C%20the%20expand%20collapse%20option%20is%20there%20but%20selecting%20a%20part%20of%20the%20text%20and%20changing%20its%20style%20will%20change%20that%20this%20text%20is%20part%20of%20the%20%3CFONT%20color%3D%22%23FF6600%22%3EH2%3C%2FFONT%3E%20(for%20example%20selecting%20and%20changing%20the%20style%20of%20%22%5Bfinding%20a%20nice%20spot%5D%22).%20Now%20the%20first%20side%20of%20the%20problem%20is%20if%20(after%20typing%20the%20title%20with%20H1%20and%20pressing%20enter)%20I%20choose%20to%20write%20something%20with%20%3CFONT%20color%3D%22%23339966%22%3Enormal%3C%2FFONT%3E%20style%20(let's%20go%20again%20with%20the%20above%20example)%20now%20after%20typing%26nbsp%3B%22Way%201%20%5Bfinding%20a%20nice%20spot%5D%22%20after%20selecting%20the%20text%20%22Way%201%22%20I%20change%20it%20to%20%3CFONT%20color%3D%22%23FF6600%22%3EH2%26nbsp%3B%3C%2FFONT%3Ebut%20the%20expand%20%2F%20collapse%20option%20is%20not%20there%20and%20the%20arrow%20on%20the%20left%20doesn't%20appear.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20screenshot%20attached%20you%20can%20see%20that%20while%20the%20text%20is%20set%20as%20heading%202%20it%20doesn't%20show%20the%20expand%20%2F%20collapse%20option%20on%20right-click%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1928753%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWord%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1953667%22%20slang%3D%22en-US%22%3ERe%3A%20expand%20%2F%20collapse%20doesn't%20work%20on%20heading%20if%20it's%20set%20later%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1953667%22%20slang%3D%22en-US%22%3E%3CP%3EHey%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F880591%22%20target%3D%22_blank%22%3E%40kalazzz%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20was%20able%20to%20replicate%20your%20experience%20and%20I%20think%20the%20cause%20is%20just%20that%20you%20have%20two%20different%20styles%20on%20the%20same%20line.%20This%20seems%20to%20confuse%20word%20so%20it%20doesn't%20show%20the%20expand%2Fcollapse%20arrow%20for%20H2%20since%20you%20also%20have%20a%20normal%20style%20on%20the%20same%20line.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20easiest%20solution%20would%20be%20to%20have%20H2%20on%20its%20own%20line%20and%20your%20normal%20style%20text%20below%2C%20but%20it%20doesn't%20sound%20like%20that's%20what%20you%20want.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20found%20a%20solution%20that%20sounds%20closer%20to%20what%20you%20want%20and%20that%20was%20to%20just%20choose%20H2%20for%20that%20whole%20row%20of%20text%2C%20then%20manually%20change%20the%20text%20you%20want%20to%20have%20a%20normal%20appearance%20by%20highlighting%20it%20and%20changing%20it%20to%20a%20more%20normal%20appearance.%20In%20my%20example%2C%20H2%20is%20Calibri%20light%20headings%2C%20size%2013%20%26amp%3B%20blue%20font%20so%20I%20changed%20the%20%22normal%22%20text%20to%20Calibri%20body%2C%20size%2012%20and%20black%20font.%20This%20allowed%20me%20to%20keep%20the%20dropdown%20arrow%20and%20collapse%20the%20section%20as%20expected.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20only%20problem%20I%20can%20see%20with%20this%20solution%20is%20if%20you%20auto-generate%20a%20table%20of%20contents%2C%20the%20normal%20text%20will%20show%20along%20with%20the%20H2%20text%20as%20shown%20in%20my%20example%20below%2C%20but%20this%20may%20not%20be%20a%20problem%20for%20you.%20You%20can%20manually%20edit%20the%20table%20of%20contents%2C%20but%20you%20will%20need%20to%20do%20that%20every%20time%20you%20update%20it.%20The%20solution%20for%20that%20would%20be%20to%20not%20edit%20it%20until%20your%20document%20is%20complete.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECollapsed%20example%20with%20table%20of%20contents%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sally365_0-1607020170297.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F237561iE74AE281E409ADF5%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22sally365_0-1607020170297.png%22%20alt%3D%22sally365_0-1607020170297.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExpanded%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sally365_1-1607020233157.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F237562i3978914219B335AB%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22sally365_1-1607020233157.png%22%20alt%3D%22sally365_1-1607020233157.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20hope%20this%20helps!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I am sorry if the subject is hard to understand I'll try to explain it as well as I can.  So when I am using H1 I will refer to the (Heading 1) style, H2 for the (Heading 2), and normal for (normal style). Assume we are creating a new .docx file, in the start I choose H1 I type my Heading, and then I press enter. Now there are two sides to this problem, the first side can happen if I choose H2 and start typing (for example "Way 1 [finding a nice spot]" ), the expand collapse option is there but selecting a part of the text and changing its style will change that this text is part of the H2 (for example selecting and changing the style of "[finding a nice spot]"). Now the first side of the problem is if (after typing the title with H1 and pressing enter) I choose to write something with normal style (let's go again with the above example) now after typing "Way 1 [finding a nice spot]" after selecting the text "Way 1" I change it to H2 but the expand / collapse option is not there and the arrow on the left doesn't appear.

 

In the screenshot attached you can see that while the text is set as heading 2 it doesn't show the expand / collapse option on right-click

2 Replies

Hey @kalazzz ,

 

I was able to replicate your experience and I think the cause is just that you have two different styles on the same line. This seems to confuse word so it doesn't show the expand/collapse arrow for H2 since you also have a normal style on the same line.

 

The easiest solution would be to have H2 on its own line and your normal style text below, but it doesn't sound like that's what you want.

 

I found a solution that sounds closer to what you want and that was to just choose H2 for that whole row of text, then manually change the text you want to have a normal appearance by highlighting it and changing it to a more normal appearance. In my example, H2 is Calibri light headings, size 13 & blue font so I changed the "normal" text to Calibri body, size 12 and black font. This allowed me to keep the dropdown arrow and collapse the section as expected.

 

The only problem I can see with this solution is if you auto-generate a table of contents, the normal text will show along with the H2 text as shown in my example below, but this may not be a problem for you. You can manually edit the table of contents, but you will need to do that every time you update it. The solution for that would be to not edit it until your document is complete.

 

Collapsed example with table of contents:

sally365_0-1607020170297.png

 

Expanded:

sally365_1-1607020233157.png

I hope this helps!

 

 

@sally365 

Hello, thanks a lot for your help. Unfortunately, I already tried that before posting here and the problem is that I am doing everything for the table of contents. So no that doesn't solve my problem. The closer solution is actually changing the table of contents manually but that's something I am trying to avoid, I prefer having it on the above line from changing the table every time. 

 

Soooo I guess there is no solution to my problem?

 

edit:
Also, this way if I am not wrong when I expand-collapse it, it won't collapse everything (only the things under the first line or paragraph because they have a different style) because the first line is also set as heading 2.