Reply
 
Thread Tools Display Modes
  #1   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default Macro to set selected cell padding to table default

Hi Fred,

I chose to post this under "Tables" rather than macros or VBA, and did
not cross-post. Hope I did it correctly.

I'd probably have chosen a cross-post (so that the message appears in
both groups, but you only post once). Sometimes, you can get VBA help in
an end-user group; and sometimes an end-user group can give you a
solution the VBA folks aren't aware of :-)

Anyway, can you describe the actions you took when recording the second
macro, where the CellPadding actions weren't recorded? Did you type in
values, or click a button to "reset" the cell padding, or...?

Word 2003 In a Table, using a macro:

I can customize the cell padding with the following code:

With Selection.Cells(1)
.TopPadding = InchesToPoints(0.05)
.BottomPadding = InchesToPoints(0.05)
.LeftPadding = InchesToPoints(0.05)
.RightPadding = InchesToPoints(0.05)
.WordWrap = True
.FitText = False
End With

which code was obtained by recording "keystrokes" (mouse clicks and
keystrokes).

If I then run a record-keystroke macro to remove the custom padding
from the cell I get only the last two lines of code (.WordWrap and
..FitText). The "TopPadding =", etc., statements are missing
altogether. But running this "remove" macro doesn't work. The
existing custom padding in the selected cell remains.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table cell alignments Kevin Microsoft Word Help 5 January 18th 05 12:41 AM
Default font - possible bulletproof fix in Word 2003 [email protected] Microsoft Word Help 0 January 14th 05 10:14 PM
Lock a Cell in Word Table? LB Microsoft Word Help 1 December 9th 04 12:42 AM
Word 2003 Table AutoFormat vs Macro vs VBA Kind writer/user/programmer Tables 1 October 28th 04 03:14 PM
Indenting a bullet list in a table cell. Fred Holmes Tables 1 October 27th 04 05:17 PM


All times are GMT +1. The time now is 07:10 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"