![]() |
|
|
|
#1
|
|||
|
|||
|
Easier than I thought. I think this works but maybe there will be a catch, somehow. Code:
Sub CheckIfTOC_Changed()
Dim rng As Range
Dim strBefore As String
Dim strAfter As String
Set rng = ActiveDocument.TablesOfContents(1).Range
strBefore = rng.Text
ActiveDocument.TablesOfContents(1).Update
Set rng = ActiveDocument.TablesOfContents(1).Range
strAfter = rng.Text
If strBefore = strAfter Then
MsgBox "No change"
Else
MsgBox "Changed"
End If
End Sub
|
|
| Tags |
| compare, toc update |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Update all fields won't update index!
|
Ryhne | Word VBA | 4 | 04-23-2020 04:49 AM |
| Unit is $, should be € - why is it being changed? | Officer_Bierschnitt | PowerPoint | 2 | 01-14-2016 03:04 AM |
| Formatting has changed? | Colonel Biggs | Word | 3 | 03-13-2015 09:14 PM |
| Update a summary chart when I update a dashboard with dates | cangelis | Excel | 6 | 09-24-2014 08:08 AM |
Update Outlook but user path changed
|
Ossie1972 | Outlook | 1 | 12-08-2010 08:19 PM |