Categories:
Cloud (204)
Entertainment (11)
Facebook (43)
General (50)
Life (31)
Programming (64)
Technology (430)
Testing (4)
Tools (488)
Twitter (5)
Wearable (26)
Web Design (44)
Collections:
Other Resources:
Macro to Replace Table Styles in Microsoft Word
How to find and replace all instances of a table style with another with a macro Microsoft Word? I have a large document with many tables. My boss wants me to replace the style on all tables.
✍: FYIcenter.com
If you want to do global replacement of a table style in Microsoft Word
you can write a Macro to get it done. The "Find and Replace" dialog box
does not support table style replacement.
1. Click "Developer" > "Macros". You see the macros management screen.
2. Enter "FindAndReplaceTableStyle" as the name of the new macro and click "Create" button. You see the "Microsoft Visual Basic for Applications" screen.
3. Enter the following code in the Code area:
Sub FindAndReplaceTableStyle()
Dim t As Table
For Each t In ActiveDocument.Tables
If t.Style.NameLocal = "Table Dark" Then
t.Style = "Table Gray"
End If
Next t
End Sub
4. Click "Run" icon to execute the macro. You see all tables changed from "Table Dark" to "Table Gray" style.
⇒ Attach Style Template File in Microsoft Word
⇐ Demote Heading Levels in Microsoft Word
2016-06-25, 2372🔥, 0💬
Popular Posts:
How to apply a character style in Microsoft Word? I want to emphasize few words in a paragraph. Appl...
How to install Mozilla Firefox 2.0 add-on: FireFTP? FireFTP is a Mozilla Firefox 2 add-on that provi...
How to find all section breaks in a Microsoft Word document? I want to review them. Section breaks i...
What is this Website about? This Website provides a collection of Frequently Asked Questions (FAQ) a...
Why am I getting the "Spawn Failed: Server at http://127.0.0.1:47353/u ser/fyicenter/didn't respond ...