
TO ASK A QUESTION: If you have a question or need help with Office, please feel free to use the 'Click to Contact' link at the bottom of this page. You'll get a form that you can use to email a question to me. (I had been getting a ton of spam when accepting direct emails, so only emails that use this form will get through to me.)
Please be sure to mention the version of Office you are using when you send your question.
I answer all e-mails that I receive via this form, as long as they are polite :)
Since disabling comments on this site, I'm actually hearing from more of you with questions ... so, as it seems people prefer to email rather than comment, I'm going to leave comments disabled. As always, you can ask me any Office-related questions you have. If the question is outside of my expertise, I'll try to direct you to where you can get an answer.
Thanks to Everyone Who Attended Today's Webcast! ... and More Information
Hi everyone! Thanks for attending my level 200 Word tips and tricks webcast today. As promised, here are a couple of links for more help on some of the topics we covered:
Let's Talk About Fields, Baby! ... basics of fields as well as steps for creating and editing fields right on screen and shortcuts for working with Fields.
Word Philosophy 101 ... fundamental concepts for working with Word documents -- reviews a lot of the prerequisite content for today's Webcast.
And, keep in mind that you'll be able to go back and view today's webcast on demand if you want to review any specific tips ... most likely, you can do that as early as tomorrow. You should receive an email with a link to that on-demand event as well as to get the PowerPoint slides from today if you weren't able to print them to PDF during the webcast.
Before you go, I owe an answer to two questions from the webcast -- and want to correct one of the answers I gave.
First, someone asked how to create multiple TOC's in one document. I'll get those steps posted by tomorrow afternoon, and note that you might want to consider that Fields article linked above as a prerequisite for the steps I'll give you tomorrow -- because you need to use fields to get this done.
The other question I owe is a list of my favorite shortcuts ... thanks for asking! One of my favorite subjects :) I'll get those posted here for you by tomorrow afternoon as well.
Here's the correction ... on one question I answered, my answer was misleading because I was answering something other than the question asked (and realized it too late). You can't create a Word TOC from content in the footer because the TOC needs a page number to reference and identical text in a footer can fall on several pages (which might not even be consecutive pages -- as in the case of a First Page footer used in several long sections). Sorry for any confusion. If anyone needs more info on that one or would like workaround suggestions for it, post a comment and I'll try to help.
And, if you left today without getting a question answered, post it as a comment here and I will respond. It's better to post it as a comment than to send me email, because then I can respond where everyone can see it. So, if you do post a comment asking for help -- come back a day later to see the answer. I try to respond to comments within a day whenever possible.
Meanwhile, look forward to seeing you all on Thursday for my next webcast -- level 200 tips and tricks for Excel charts. Click this link to get more details or to register: Complex Excel Charts Made Simple
Happy Tuesday folks! :)
TrackBack URL for this entry:
http://www.arouet.net/cgi-bin/mt2/mt-tb.cgi/72
Comments
I've never used the Table of Contents capabilities of Word (for shame!). I'd asked about using info in the footers for the following publication: a collection of one-page teacher projects which are organized by focus area (printed in the footer). I wanted the TOC to print the focus area and the page number where an area first appears, since there are no chapter/intro pages. Last year I finally figured out what was happening with section breaks, SAME AS PREVIOUS, and footers...and now it's mine! Is there a way to get what I want with TOC?
Posted by: Rosemary Dexter-Smith | April 26, 2005 03:48 PM
Hi, Rosemary!
So glad you saw that correction -- thanks for coming to the site.
Workarounds for what you want to do are going to be quite cumbersome -- and, I felt bad for misdirecting you in the first place :) -- so I wrote you a little macro that should do the trick. You'll just have to do a tiny bit of set up and then be good to go. This post is really long because it gives you a lot of instructions. I posted the code for the macro at the end of this comment, but don't worry -- you don't need to know a thing about VBA (macro) code to use it. If you dont know how to get it into Word or get started using it, let me know and I'll post steps for setting it up.
SOME INSTRUCTIONS\DETAIL ABOUT THIS MACRO:
This macro will add a Table of Contents wherever your insertion point is ... the TOC will be created only from text in the footer that is styled in a particular style (so it doesn't take other footer text you don't want). For my macro, I told Word to look for footer text that uses the Heading 1 paragraph style - but you can replace this with any style name you choose, as long as the style exists in a document where you want to use the macro to create a TOC. Otherwise, you'll get an error when you use the macro.
Also - I assumed that you were not using the Different First Page or different Odd\Even headers and footers in these documents. It will take correctly-styled text from any footer, so if you are using those footer types -- make sure you don't get unwanted extra TOC entries. Also, it's set up for a single-level table of contents (it uses Word's built-in table of contents style TOC 1, but you can change that as well).
The macro is set up to tab from the footer text to the page number on each line of the TOC, so you'll want to add the "TOC 1" style to your document and format it to include a right-aligned page number (with a tab leader if you like), so that the formatting of the created TOC looks right. All documents come with the TOC styles available, but you won't see access to it by default from the Styles & Formatting task pane. Let me know if you need help getting that done, and I'll post a sample.
HERE IS THE MACRO (Again ... don't worry if you don't know how to read macros -- you don't have to... I can help you get it set up. Just let me know if you need help)
Sub footerTOC()
Dim aft As HeaderFooter
Dim asc As Section
Dim apr As Paragraph
Dim counter As Integer
counter = 0
On Error GoTo ErrorHandler
For Each asc In ActiveDocument.Sections
For Each aft In asc.Footers
For Each apr In aft.Range.Paragraphs
If apr.Style = "Heading 1" Then
counter = counter + 1
With Selection
.Style = "TOC 1"
.TypeText (apr.Range.Text)
.TypeBackspace
.TypeText (vbTab & apr.Range.Information(wdActiveEndAdjustedPageNumber) & vbCr)
End With
End If
Next apr
Next aft
Next asc
If counter = 0 Then
MsgBox "Your document contains no footer text in the style required for creating a TOC with this macro.", vbInformation
End If
Exit Sub
ErrorHandler:
MsgBox "This TOC macro ended in error. Check to ensure that the required style exists in the document and then retry."
End Sub
[END SUB, above, was the end of the macro code]
Hope this helps!
Best,
Stephanie
Posted by: Stephanie Krieger | April 26, 2005 05:22 PM