Table of Contents Automatic Update

Is there a way that I can set the table of contents to automatically update 
like when I save or close a document? If so, how?  Thanks!
0
Utf
6/3/2010 4:01:03 PM
word.pagelayout 771 articles. 0 followers. Follow

1 Replies
2745 Views

Similar Articles

[PageSpeed] 49

The following pair of macros should work:

Sub FileSave()
Dim t As TableOfContents
For Each t In ActiveDocument.TablesOfContents
t.Update
Next t
If ActiveDocument.Path = "" Then
Dialogs(wdDialogFileSaveAs).Show
Else
ActiveDocument.Save
End If
End Sub

Sub FileSaveAs()
Dim t As TableOfContents
For Each t In ActiveDocument.TablesOfContents
t.Update
Next t
Dialogs(wdDialogFileSaveAs).Show
End Sub

Place the macros in the Normal template. See 
http://www.gmayor.com/installing_macro.htm for assistance.

-- 
Stefan Blom
Microsoft Word MVP
(Message posted via msnews.microsoft.com)



"tjb" <tjb@discussions.microsoft.com> wrote in message
news:A9F8288D-78E7-4494-8621-80B5F3BD3D6F@microsoft.com...
> Is there a way that I can set the table of contents to automatically update
> like when I save or close a document? If so, how?  Thanks!



0
Stefan
6/3/2010 6:39:21 PM
Reply:

Similar Artilces:

need help updating chart (series in dynamic range)
Hi, I have couple charts with series in dynamic range. In VBA, I tried to update them using chart1.refresh. Somehow, not all the charts are updated. Any idea? Thanks Jeff, You might try adding a selection change event similar to one of the two below to the sheet module that holds the charts . . . Private Sub Worksheet_SelectionChange(ByVal Target As Range) ActiveSheet.Calculate End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If ActiveCell.Row > 1 And ActiveCell.Row < 5 Then _ ActiveSheet.Calculate End Sub A recalculation is forced causi...

Finding unique items in data field for pivot tables
I have a huge pivot table I'm trying to create and for a critical item I select I get the following message: A field in your data source has more unique items that can be used in a PivotTable. Microsoft Excel may not be able to create a PivotTable or may create the PivotTable without the data from this field. Any ideas how I can find the duplicates and create the PivotTable with this field? Hello- Based on the message, 'duplicates' is not your problem, *Unique* items is. Pivot tables are limited to 32,500 unique items per field. So if you're analyzing product sales, for...

How do I do a Depreciation Table
i really need help for my assignment and i dont know how to do a depreciation table its really simpl ei just cant do it the purchase price is $200 000 and it depreciate 5% each year and i haev ot work out the value oafter 25 years. i really need help so i know what im doing. thanks for any help Good Morning SarahJessica88 I assume from your question that you are using reducing balance depreciation (as opposed to straight line which would be fully depreciated at 5% after 20 years). I also assume you want to show the balance each year and not just the balance after 25 years. If you have...

How to open Outlook automatically at startup
I use Windows XP. I can't find how I add an application, such as Outlook, to what used to be called Startup Menu. I want Outlook, Calculator, and some other programs to open when I startup my computer. How do I do this in Win XP. Open the startup menu, right click in an empty space, and select to create a new shortcut. Browse to the Office folder and then click on the Outlook.exe file. Do the same for any other shortcuts you want added to the startup folder. Note, however, that as you add more programs, Windows will start to boot slower and slower. --� Milly Staples [MVP - Outl...

Record (row) count by Table in Database
I have a rather critical need to monitor the number of rows for each table in a database. The Database contains 17 tables, and at any given time any one of the tables can contain zero (0) rows or several thousand rows. I was thinking along the lines of creating another table which would contain: Table Name, Date/Time and the Row Count. and appending the row count for each table via a summary query. This way, I could see not only the number of rows in each table at a given point of time but also look at the 'trend' by table. I have two problems with this approach, the f...

automatically download bulk-mail attatchments to folder
Is there a way to download bulk-mail attatchments to a specific folde on my hard drive(in outlook or express). If you have any idears pleas let me know. Thanks, Johnny ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com ...

Row height
Hi all, Is there a way to have the row height adjust automatically to display all the lines of text that may be in a particular cell ? I have "WRAP TEXT" selected from the Alignment menu when you format the contents of a cell but this does not automatically adjust the row height to display all the lines of wrapped text. I have been adjusting the row height manually and this is a pain in the b...... when you have to do this each time your cell contains more than one line of text. Thanks in advance for any info that you can share with me. Regards ..... Ben Doesn't wor...

SS Tax Table
What table stores the Social Security maximum earnings? It's $106,800 for 2009 but darned if I can find the table where that is stored. Thanks in advance, Frank Hamelly MCP-GP, MCT, MVP East Coast Dynamics www.eastcoast-dynamics.com blog: www.gp2themax.blogspot.com Found it - UPR41302 in the DYNAMICS db. Frank Hamelly MCP-GP, MCT, MVP East Coast Dynamics www.eastcoast-dynamics.com blog: www.gp2themax.blogspot.com Sir, When I am posting a Payroll manual check entry in GP I am getting an error message that FICA/Social Security tax table cannot be found. I then tried to create the re...

Using Macro to Alter Pivot Table
Is it possible to get a macro to take the Content of a cell and use that to alter a pivot table. For example: "In the pivot table the different criteria for Page are 1;2;3. Usualy it shows the data regarding to 1;2;3. In another datasheet I typ 1. "Is it possible to make the Pivot Table show only the data regarding 1; instead of 1;2;3 by use of a macro?" Thanks in Advance! You can use an event procedure to change the page field item. Select the sheet on which you'll type the number Right-click the sheet tab, and choose View Code Where the cursor is flashing, paste ...

Take a look at that security update
--budzjaofddp Content-Type: multipart/related; boundary="erflecrz"; type="multipart/alternative" --erflecrz Content-Type: multipart/alternative; boundary="jqblphcvlxsstjm" --jqblphcvlxsstjm Content-Type: text/plain Content-Transfer-Encoding: quoted-printable MS Customer this is the latest version of security update, the "September 2003, Cumulative Patch" update which eliminates all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express as well as three newly discovered vulnerabilities. Install now to protect...

How do i link tables together?
I've created a database for clients and jobs. I have one table for Client. I have drop down menus listing the jobs. Is there a way to have another table just for jobs so if i need to add another job it updates the drop down menu's in everything and i just have to create the reports? At the moment if i have to add another job in, i have to redesign everything - tables, forms - which can be a bit time consuming. thanks When you set up the jobs field in the clients table did you tell it to look up fields in another table (jobs table) ? Mæl. "sea_minerals@yahoo.com"...

Table Changes
Where is the documentation for the table changes for GP 9 It should be in the help menu. Gerald "Brian" wrote: > Where is the documentation for the table changes for GP 9 > I have yet to install it.. I am trying to make sure that I have everything covered do to the fact we have numerous outside apps that talk to the backend of GP and want to prevent any possible headaches Gerald wrote: > It should be in the help menu. > > Gerald > > "Brian" wrote: > >> Where is the documentation for the table changes for GP 9 >> Brian, What...

Pivot Tables #14
I need to know how to update links in a pivot table emailed to me if th document that the pivot table is using is also sent to me. Thi original document would be sent once a month and I will need to updat the pivot table with this information. I am trying to avoi recreating the pivot tables because there is a lot and it has graph also -- Message posted from http://www.ExcelForum.com ...

windows updates installation fails
Hello there, I am using XP Pro sp3, I just installed it and when running the windows updates from IE I am able to download the updates bu then the installation fails. How can I delete all downloads and reset the windows client update settings? Thank you, T Which is the update(s) failing to install? Further information required: How to view the Update log in Windows Click Start, and then click Run. In the Open box, type %windir%\windowsupdate.log and then click OK. Scroll down towards the bottom for the latest entries to locate the error code(s) associated with the ...

update installing
a new malicious software update keeps coming up every couple of minutes i install and restart and then it just keeps coming back as if it hasnt installed however it always says it has any help?thanks I can't upload updates it is telling me that 4 important ones are failing to update. I don't understand what is going on right now. What should I do? "timetrumpet" wrote: > a new malicious software update keeps coming up every couple of minutes i > install and restart and then it just keeps coming back as if it hasnt > installed however it always says i...

Updating a DATE, only if the page has been modified.
I have a spreadsheet with a cell containing: ="Print Date: "&Text(TODAY(),"mmm-dd-yyyy") I want to add another cell that reflects the date of the last time the sheet was modified/changed. So the logic would be somthing like: IF (Sheet-Changed, Current-Date, Previous-Date) Can any one point me in the right direction? Thank you That requires custom VBA code. If you want help with that just let us know. -- HTH... Jim Thomlinson "Michael" wrote: > I have a spreadsheet with a cell containing: > ="Print Date: "&...

updated driver in OOBE(audit mode) no longer selected in normal mo
Greetings, We're trying to update our mouse filter driver to a newer revision inside OOBE(audit mode in W7). It seems the updated driver is properly loaded after rebooting to OOBE; however, if we switch back to normal mode, OS only selects the old driver. Is there any way to force the !audit mode OS to load the new driver updated in OOBE? Thanks. What's the difference between rebooting to OOBE and switching back to normal mode? It's not clear from that description what you mean. What process are you using to update the filter driver? Unless there is a sys...

Automatic Forwarding, and Reply
We are implementing a new policy for handling users who leave the company. The policy states that when a person is terminated, all of his/her email will be forwarded to their direct supervisor. We will then auto-respond to the sender to notify them that the person no longer works with our company, and give them an alternate contact. I need a solution that uses Exchange 2003 to setup a rule that both forwards messages, and responds to the user who sent the original message. Is there a way to do this in Exchange 2003? It makes sense to me that it would be some type of Server based rule, ...

create pivot table from external csv file
I am dumping huge data to csv file, Now what I want to do is, create pivot table/chart from csv file without importing data into it. Reason behind doing this is, end user view updated report without messing with thier limited excel knowledge. Hi, So what's your question? If you're asking if it can be done, the answer is Yes. If you're asking how to do it, the question is - what version of Excel are you using? For Example in 2003 you would choose Data, Pivot Table and Pivot Chart Report, and choose External data source, Next, Get Data, choose New Data Source and cl...

GENERATING AUTOMATIC
I Want To Know If Theres an Easy Solution To Creating an Auto generated Field As I don't Really Want to Go Through all My Forms, Query, and Reports Changing Everything. At Moment I Have i Field Called "ProjectQNo" Text Type, Where The User Just Types The Number In, Though Ive Been Told They Want it Auto generated. An Example Of a QNo Is Q563707 Then Next One Would Be Q563807 As You Notice The Last To Digits Is The Year, They Have Cold Me If it Makes It Easier They'll Apcept Q070001 Q070002 Any Suggestions, I know One Way That Would To Created 3 Columns Q | Year ...

slow toolbar updates
Hi, I have a toolbar button that has the usual OnButtonPress and OnUpdateButtonPressUI. The problem is that there is considerable amount of processing to be done when the button is actually pressed. Since the OnUpdateButtonPressUI is called in the idle loop, when the user presses the button, it can take a while for the button to actually look depressed. Currently I work around this by sending an WM_IDLEUPDATECMDUI message in the OnButtonPress to force an idle update, but there is other stuff in the idle loop that is being called when I do this, so its taking time to complete that too. Is th...

Rules do not execute automatically
Recently Outlook stoped processing a group of rules that move mail from an Exchange Server folder to the client personal folders. The rules all run when executed through the rules wizzard (i.e. Run Now) without error, but will simply stop working based on mail hitting the exchange server inbox. Looking for some ideas on trouble shooting. ...

Formula for table lookup
I need to be able to enter a value into two different cells and return a value from a table to match a certian value from that table. two cell values sheet 1 A1= 1" A2= 75# if you go to 1" and across to 30# you get 23.99 this is the value I would like to have returned. The table is on sheet 2 of the same workbook. It's not really a table its just data in cells. Trap Size 25# 30# 75# 1/2" 3.31 3.83 8.4 3/4" 9.2 10.64 23.35 1" 20.74 23.99 52.65 1 1/4" 26.59 30.76 67.51 1 1/2" 36.79 42.55 93.39 2" 57.48 66.49 145.93 2 1/2" 82.72 95.7 210.02 3...

Dragging for automatic filling
Hi, In excel if I have q294bup1 in acell and I drag it down wih mouse using the handle it updates to q294bup2 and q294bup3 and so on. On the other hand if I press ctrl and drag it down it doesnt get updated (remains as q294bup1 in all dragged cells) Again if I have numbers in a cell like 1 and if I drag it down it remains as 1 (as opposed to Q294b1 + Dragging). If I press ctrl and drag the number 1 in a cell it increases to 2, 3 and so on ( ( as opposed to Q294b1 + Ctrl + Dragging). Why this different behaviour(s) regarding to dragging vs Ctrl + dragging depending on what one has in a par...

adding automatically
hi everyone please help i'd like to be able to add automatically from the same cell. for example in a1 i have 1 apple there i'd like to be able to type 1 again in a1 and it automatically adds i to 2 in a1 can this be done? thanks in advanc -- Message posted from http://www.ExcelForum.com Have a look here http://www.mcgimpsey.com/excel/accumulator.html -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 97 ** remove news from my e...