![]() |
|
|
|
#1
|
||||
|
||||
|
The TOC field has a switch to look within a certain bookmark i.e '\B "BookMarkName".
Now the area that I have bookmarked has Footnotes, But I see all the TC fields that are in the FN are not being picked up by the TOC field. When I select the text to apply the BM it doesn't allow me to select ALSO the FN area. So how can INclude the FN area within the giving BM? Thanks a million!! Susan |
|
#2
|
||||
|
||||
|
I have just been informed by the M$oft discussion group that the issue is not the BM but that TOC doesn't recognize TC field in footnotes. Again a blatant exhibition of Anti FootnoteIsm !!
But it does find index entry fields in FN so what is the big deal to have them allow TOC to find TC in FN. Totally beyond me... Sigh
|
|
#3
|
|||
|
|||
|
This is a user-to-user support forum. -- You can give feedback TO MICROSOFT designers and decision makers on Microsoft Word or other Microsoft Products (using their feedback mechanisms, not here)
You can put a TC field in the page on which the footnote appears. It can be at the point where you insert the footnote. This is not just about Word. It is about major points not being in footnotes. |
|
#4
|
||||
|
||||
|
In this case, it has nothing to do with footnotes.
TC fields are HIDDEN - Hidden text doesn't show up in TOCs.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
#5
|
|||
|
|||
|
Quote:
TC fields, when hidden in the body of the document, are designed to show up in a TOC. That is their whole purpose. |
|
#6
|
||||
|
||||
|
Thanks for the correction Charles. You are correct and I was thinking of style/outline methods of buildingr TOCs where hidden text is ignored even when in the correct style or outline level.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
#7
|
||||
|
||||
|
The challenge: To create a TOC exclusively based on the FN area for a certain chapter of a book in Word.
The problem: Due to MSoft's extreme AntiFooteNoteIsm, it is not allowing Word to pick up TC fields in the FN area. We need to go about this manually. The macro builds the TOC based on text formatted with char style MyStyle. Builds the text of the toc and then calculates how this will affect page numbering and then inserts the results at the current location. The macro only collected the text string formatted with this style till it hits a section break which designates the end of the chapter. So we will have to build two TOC, one for the main text area and another for the FN area, and then manually merge them I imagine this macro can be modified a lot to do a more efficient job. If anybody does do anything I would appreciate them posting it here. I didn't write this of course only paid a friend of mine to do it, Enjoy! Susan PS Since I paid for this and this friend takes money for every and any keystroke he makes for me I would appreciate hearing criticism if you think he went about it correctly. Thank you -Susan --------------------------------------------------------------> Code:
Sub MakeTOCBasedOnFN()
CreateTableContentsForCurrentSection "myStyle"
End Sub
Code:
Sub CreateTableContentsForCurrentSection(styleName As String)
Dim curSec As Section
Set curSec = GetCurrrentSection
Dim texts As New Collection
ScanSectionFootNotes curSec, texts, styleName
InsertTableOfContents texts
End Sub
Code:
Sub InsertTableOfContents(texts As Collection)
Dim paras As New Collection
Dim rng As Range
Dim i As Integer
For i = 1 To texts.Count
Set rng = texts(i)
Selection.TypeText rng.text
paras.Add Selection.Range.Duplicate
Selection.TypeText vbCr
Next
Dim paraRng As Range
For i = 1 To paras.Count
Set rng = texts(i)
Set paraRng = paras(i)
paraRng.text = " " & rng.Information(wdActiveEndAdjustedPageNumber)
Next
End Sub
Code:
Sub ScanSectionFootNotes(sec As Section, texts As Collection, styleName As String)
Dim orginalSelection As Range
Set orginalSelection = Selection.Range.Duplicate
Dim fn As Footnote
Dim findRenge As Range
Dim i As Integer
For i = 1 To sec.Range.Footnotes.Count
Set fn = sec.Range.Footnotes(i)
Set findRenge = fn.Range.Duplicate
Do
If Not (findRenge.Style Is Nothing) Then
If findRenge.Style = ActiveDocument.Styles(styleName) Then
texts.Add findRenge.Duplicate
Exit Do
End If
End If
With findRenge.Find
.ClearFormatting
.Replacement.ClearFormatting
.Style = styleName
.text = ""
.Replacement.text = ""
.Format = True
.Forward = True
.Wrap = wdFindStop
If Not .Execute Then Exit Do
texts.Add findRenge.Duplicate
findRenge.Collapse wdCollapseEnd
findRenge.End = fn.Range.End
If findRenge.text = "" Then Exit Do
End With
Loop
Next
orginalSelection.Select
End Sub=
Code:
Function GetCurrrentSection() As Section
Dim sec As Section
For Each sec In ActiveDocument.Sections
If Selection.Start >= sec.Range.Start And Selection.Start <= sec.Range.End Then
Set GetCurrrentSection = sec
Exit Function
End If
Next
Err.Raise 111111, , "Current secton not found"
End Function
Moved by moderator from separate post. Reformatted to add CODE tags. Last edited by Charles Kenyon; 02-11-2024 at 10:09 AM. |
|
#8
|
|||
|
|||
|
Cross-posted at: https://answers.microsoft.com/en-us/msoffice/forum/all/bookmarking-also-the-fn/f33220c0-15b6-4042-b442-303fe0ee791e
For cross-posting etiquette, please read: A Message to Forum Cross-Posters |
|
#9
|
||||
|
||||
|
Ok, I was soothed by the line that the person who sent me there is not angry
![]() I usually post to three discussion groups: 1. Here (my first choice) 2. MSoft support forums 3. Reddit MS Word discussion group. The reason for this behavior is simple: I understand that I am asking for free advice and nobody owes me anything. And everybody is busy and may not have the time or patience to answer my sometimes annoying questions. So I throw it to these places with the hope that someone in one of those three will able to be my savior ![]() If I understand correctly from where you "not angerly" sent me: I have to post a link to the OP wherever that may be and update any solutions that are suggested. Right? I am extremely grateful to be a member of this discussion group and maybe the day will come when I can also help others Susan Flamingo |
|
#10
|
|||
|
|||
|
Quote:
It seems like only a short time ago that I was referred to that same page by macropod (it was probably more than a decade). Yes, the basic idea is to, while gathering a wider audience, the focus should be a single thread on a single site. That allows those trying to help to not talk over one another or repeat things already said and to respond to other ideas. It also makes it more likely that someone doing a web search will find the answer that is developed. Glad to have you aboard. Last edited by Charles Kenyon; 02-12-2024 at 01:23 PM. |
|
#11
|
|||
|
|||
|
Also cross posted here: https://www.msofficeforums.com/word-...-based-fn.html
... and I think it is the solution she is looking for. |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Dot leaders extending to a second line
|
Maureen Sanders | Word | 6 | 06-26-2023 12:13 PM |
extending a selection
|
VBAFiddler | Word VBA | 4 | 03-07-2021 12:38 PM |
| Extending or shortening an existing line | ironman1159 | Drawing and Graphics | 0 | 07-01-2019 03:06 PM |
Extending Table or Textbox to Next Page
|
Jazz43 | Word | 3 | 10-17-2012 01:43 AM |
| extending an arrow? | danjohnson10 | PowerPoint | 1 | 04-23-2011 04:39 PM |