Re: Copy/paste table formatting in Word?

Subject: Re: Copy/paste table formatting in Word?
From: Tony Chung <tonyc -at- tonychung -dot- ca>
To: "Gilbert, Brian" <BGILBER -at- transunion -dot- com>
Date: Wed, 3 Apr 2013 14:43:28 -0700

"Janoff, Steven" <Steven -dot- Janoff -at- ga -dot- com>

> Is there a quick way to copy/paste table formatting in Word 2010 (Windows
> 7)?
>


"Gilbert, Brian" <BGILBER -at- transunion -dot- com>

> Use a macro. Go to the table. Start the macro.



I like Brian's macro idea so much. I wrote one. To add this macro to your
document (or your Normal.dotm, preferred):

1. In Word, press ALT + F11 to open the VBA editor.
2. Right click Normal and select Insert > Module
3. Copy and paste this text into the window:

' Code snippet -- BEGIN
Sub TableSetup()
Dim tblTable As Table, iCount As Integer
For Each tblTable In ActiveDocument.Tables
With tblTable
.PreferredWidthType = wdPreferredWidthPercent
.PreferredWidth = 100
.Columns.PreferredWidthType = wdPreferredWidthPercent
.Columns(1).PreferredWidth = 17
.Columns(2).PreferredWidth = 83
.Rows(1).HeadingFormat = True
End With
iCount = iCount + 1
Next
MsgBox iCount & " tables updated"
End Sub
' Code snippet -- END

4. Open the document where the tables need to be adjusted.
5. With this document highlighted, press ALT + F8 to open the Macros dialog.
6. Select TableSetup and press Run. All the tables will be set the same.

You can add other properties to this macro to automate even more things. I
love VBA.

-Tony
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>From our sponsor Doc-to-Help: Want to see a Doc-To-Help web-based Help sample with DISQUS for user commenting?

Learn more: http://bit.ly/13xpg5n

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You are currently subscribed to TECHWR-L as archive -at- web -dot- techwr-l -dot- com -dot-

To unsubscribe send a blank email to
techwr-l-leave -at- lists -dot- techwr-l -dot- com


Send administrative questions to admin -at- techwr-l -dot- com -dot- Visit
http://www.techwhirl.com/email-discussion-groups/ for more resources and info.

Looking for articles on Technical Communications? Head over to our online magazine at http://techwhirl.com

Looking for the archived Techwr-l email discussions? Search our public email archives @ http://techwr-l.com/archives


Follow-Ups:

References:
Copy/paste table formatting in Word?: From: Janoff, Steven
RE: Copy/paste table formatting in Word?: From: Gilbert, Brian

Previous by Author: TECHWR-L Premium Jobs, Events, and Announcements
Next by Author: Re: Justifying FM (was About The Cloud: Quick-Read, Suggestions)
Previous by Thread: RE: Copy/paste table formatting in Word?
Next by Thread: RE: Copy/paste table formatting in Word?


What this post helpful? Share it with friends and colleagues:

Sponsored Ads


Sponsored Ads