Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-21-2019, 02:57 AM
lferrara lferrara is offline TOC entries in one paragraph Mac OS X TOC entries in one paragraph Office 2011 for Mac
Novice
TOC entries in one paragraph
 
Join Date: Oct 2019
Posts: 2
lferrara is on a distinguished road
Default TOC entries in one paragraph

Hi all,
this is my first post and I apologize in advance for errors.

I am an Italian researcher in law and political sciences, and I use word (word for mac 2011) to write my scientific articles for Italian scientific journals. For several scientific journals in law, I need to write a "compact" Table of Content of my article after title and abstract, with all entries in one paragraph, without starting a new line after each header and page.


If I use ms word TOC (both with styles or TC fields), I get:

Table of contents
Introduction....1
Paragraph1...3
Paragraph2...5
Conclusion...8

I would need:
Table of contents: Introduction, 1 - Paragraph1, 3 - Paragraph2, 5 - Conclusion, 8.

How I may customise TOC to avoid to start a new line after page number?

Actually, I have to write the TOC manually and create crossref for each paragraph headers, to update page numbers. I would like to use TOC field with styles or TC fields.

Thank you in advance,
Luigi
Reply With Quote
  #2  
Old 10-21-2019, 11:51 AM
Charles Kenyon Charles Kenyon is offline TOC entries in one paragraph Windows 10 TOC entries in one paragraph Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,070
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

A TOC cannot appear the way you want. It is one line per entry.
Look into the Index feature.
Reply With Quote
  #3  
Old 10-21-2019, 03:19 PM
Guessed's Avatar
Guessed Guessed is offline TOC entries in one paragraph Windows 10 TOC entries in one paragraph Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,919
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Charles is right but you can retrofit a table of contents after refreshing it to do basically what you are asking. The following macro could be used to refresh your TOC and then compact it.
Code:
Sub CompactTOCUpdater()
  Dim aRng As Range, aTOC As TableOfContents
  Set aTOC = ActiveDocument.TablesOfContents(1)
  Set aRng = aTOC.Range
  aTOC.Update
  With aRng.Find
    .ClearFormatting
    .Replacement.ClearFormatting
    .Text = "^t"
    .Replacement.Text = ", "
    .Forward = True
    .Wrap = wdFindStop
    .Format = False
    .MatchCase = False
    .MatchWholeWord = False
    .MatchWildcards = False
    .MatchSoundsLike = False
    .MatchAllWordForms = False
    .Execute Replace:=wdReplaceAll
    .Text = "^p"
    .Replacement.Text = " – "
    .Execute Replace:=wdReplaceAll
  End With
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #4  
Old 10-26-2019, 04:04 AM
lferrara lferrara is offline TOC entries in one paragraph Mac OS X TOC entries in one paragraph Office 2011 for Mac
Novice
TOC entries in one paragraph
 
Join Date: Oct 2019
Posts: 2
lferrara is on a distinguished road
Default

Dear all,
I thank you very much for your answers. I will try the macro.
Greetings,
Luigi
Reply With Quote
Reply

Tags
table of contents

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why does paragraph inherit style of the following paragraph? WADEVCAMP Word VBA 2 04-08-2019 02:13 PM
TOC entries in one paragraph Continuous Paragraph across two columns vs Parallel Column Paragraph Pinesh Word 2 03-09-2018 04:24 PM
TOC entries in one paragraph Cross-reference to paragraph not updating when paragraph moves windhoek2010 Word 1 09-15-2017 08:30 PM
TOC entries in one paragraph alphabetize a list (manual index) with entries and sub-entries shmu Word 5 08-01-2016 11:15 PM
TOC entries in one paragraph Narrow Paragraph to Wide Paragraph HELP icloudy Word 1 12-09-2012 03:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft