inspirestill.blogg.se

Word 2016 table of contents runs off page
Word 2016 table of contents runs off page




word 2016 table of contents runs off page
  1. #Word 2016 table of contents runs off page code#
  2. #Word 2016 table of contents runs off page plus#

What’s different about the Sub-title style? Nothing really … here’s the style settings: The paragraph under the heading has the style ‘Sub-title’ which looks no different from the rest of the section. Here’s the main document with a heading, sub-title paragraph and the rest of the text. Even if the text looks the same as the main document, the style is needed so Word can figure out what has to go in the TOC. The extra text or sub-title to appear under the heading needs a custom style. The main heading (Heading 1 in our example) is quite standard. Document setupįirst, setup your document with the right styles and text. We’ll explain why we’re choosing certain options so you can adjust our example to suit your own needs.

#Word 2016 table of contents runs off page code#

Use a field code switch to stop the page numbering on the second level lines. Use Styles (not Outline levels) to make a limited Table of Contents (TOC) based on only two styles. It’s hardly an obvious method … so here’s a guide. It’s possible to make a special summary in Word that updates automatically.

#Word 2016 table of contents runs off page plus#

Usually this is the main headings plus some text that summarizes that chapter/section. In the Macro window, select the Create_TOC macro, and click Run.Among the many Table of Contents questions we’ve received were very good ones about making a ‘Quick Reference’ guide to a Microsoft Word long document.On the Developer tab, in the Code group, click Macros.Note To help prevent potentially dangerous code from running, we recommend that you return to any one of the settings that disable all macros after you finish working with macros.Īnd now you can run the code that creates the table of contents worksheet! Under Macro Settings, click Enable all macros (not recommended, potentially dangerous code can run), and then click OK.On the Developer tab, in the Code group, click Macro Security.To set the security level temporarily to enable all macros, do the following: You might need to change your macro security settings to enable macros. On the File menu, click Save As, and then save the file as an Excel Macro-Enabled Workbook (.xlsm).In the Visual Basic Editor, on the File menu, click Close and Return to Microsoft Excel.Now, save your workbook with the macro code. WsActive.Columns(“A:B”).EntireColumn.AutoFit Cells(lnRow, 2).Value = “‘” & lnCount & “-” & lnPages ‘of pages to be printed for each sheet on the TOC sheet. ‘sheetnames, add hyperlink and count & write the running number ‘Iterate through the worksheets in the workbook and create Value = VBA.Array(“Table of Contents”, “Sheet # – # of Pages”) ‘If the TOC sheet already exist delete it and add a new

word 2016 table of contents runs off page

In the code window of the module, type or copy the following macro code:.In the Visual Basic Editor, on the Insert menu, click Module.On the Developer tab, in the Code group, click Visual Basic.Under Customize the Ribbon, select the Developer check box.If you don’t usually work with code in Excel, you probably don’t see the Developer tab in the Ribbon. First, you have to add the code to your workbook, and to do that you need the Developer tab.






Word 2016 table of contents runs off page