Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-08-2024, 09:46 AM
RRB's Avatar
RRB RRB is offline Extending a BM to include FN Windows 11 Extending a BM to include FN Office 2021
Susan Flamingo
Extending a BM to include FN
 
Join Date: May 2014
Location: The Holy City of Jerusalem
Posts: 263
RRB is on a distinguished road
Default Extending a BM to include FN

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
Reply With Quote
  #2  
Old 02-08-2024, 11:09 AM
RRB's Avatar
RRB RRB is offline Extending a BM to include FN Windows 11 Extending a BM to include FN Office 2021
Susan Flamingo
Extending a BM to include FN
 
Join Date: May 2014
Location: The Holy City of Jerusalem
Posts: 263
RRB is on a distinguished road
Default

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
Reply With Quote
  #3  
Old 02-08-2024, 11:44 AM
Charles Kenyon Charles Kenyon is offline Extending a BM to include FN Windows 11 Extending a BM to include FN Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
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

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.
Reply With Quote
  #4  
Old 02-08-2024, 02:59 PM
Guessed's Avatar
Guessed Guessed is offline Extending a BM to include FN Windows 10 Extending a BM to include FN Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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

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
Reply With Quote
  #5  
Old 02-09-2024, 11:59 AM
Charles Kenyon Charles Kenyon is offline Extending a BM to include FN Windows 11 Extending a BM to include FN Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
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

Quote:
Originally Posted by Guessed View Post
In this case, it has nothing to do with footnotes.

TC fields are HIDDEN - Hidden text doesn't show up in TOCs.
Sorry, Andrew.
TC fields, when hidden in the body of the document, are designed to show up in a TOC. That is their whole purpose.
Reply With Quote
  #6  
Old 02-09-2024, 11:43 PM
Guessed's Avatar
Guessed Guessed is offline Extending a BM to include FN Windows 10 Extending a BM to include FN Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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

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
Reply With Quote
  #7  
Old 02-11-2024, 06:27 AM
RRB's Avatar
RRB RRB is offline Extending a BM to include FN Windows 11 Extending a BM to include FN Office 2021
Susan Flamingo
Extending a BM to include FN
 
Join Date: May 2014
Location: The Holy City of Jerusalem
Posts: 263
RRB is on a distinguished road
Default MAcro for eveyone and anyone top create TOC from FN area

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.
Reply With Quote
  #8  
Old 02-11-2024, 10:11 AM
Charles Kenyon Charles Kenyon is offline Extending a BM to include FN Windows 11 Extending a BM to include FN Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
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

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


Reply With Quote
  #9  
Old 02-11-2024, 10:29 AM
RRB's Avatar
RRB RRB is offline Extending a BM to include FN Windows 11 Extending a BM to include FN Office 2021
Susan Flamingo
Extending a BM to include FN
 
Join Date: May 2014
Location: The Holy City of Jerusalem
Posts: 263
RRB is on a distinguished road
Default

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
Reply With Quote
  #10  
Old 02-11-2024, 10:47 AM
Charles Kenyon Charles Kenyon is offline Extending a BM to include FN Windows 11 Extending a BM to include FN Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
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

Quote:
Originally Posted by RRB View Post
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
Hi Susan,

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.
Reply With Quote
  #11  
Old 02-12-2024, 08:34 AM
gmaxey gmaxey is offline Extending a BM to include FN Windows 10 Extending a BM to include FN Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,429
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Also cross posted here: https://www.msofficeforums.com/word-...-based-fn.html


... and I think it is the solution she is looking for.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extending a BM to include FN Dot leaders extending to a second line Maureen Sanders Word 6 06-26-2023 12:13 PM
Extending a BM to include FN 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 a BM to include FN 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

Other Forums: Access Forums

All times are GMT -7. The time now is 02:19 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