Reply
 
Thread Tools Display Modes
  #1   Report Post  
Kind writer/user/programmer
 
Posts: n/a
Default Word 2003 Table AutoFormat vs Macro vs VBA

Ultimate goal is to create a predictable ironclad table format.

What's diff tween using a macro (and some VBA fortifications) vs Table
Autoformat (with a customized table style). Each approach has problems:

I defined table cell styles and used a macro, to some degree of
success...however, some settings (heading rows repeat) are toggles; other
items don't "show up" as a VB command/method/object (i.e., format to fit
content, then turn that off so table doesn't automatically resize).

I also customized one of the autoformat table styles to look more or less
like I want.

However, the Autoformat doesn't apply "styles" to cells, so when users use
(for example) Normal, or Heading 1 (autonumbered), the paragraph formatting
in the cells is wrong. Also the checkboxes for first row different (table
head centered tyle) and first column different(table cell bold) style), don't
seem to stick.

And, the table layout is...well, resizing table widths is a new challenge in
Word 2003. The Alt key helps (when resizing), but most often, mousing over a
column divider (vertical line in a table), the cursor blinks from 4-arrow to
white diagonal, and its a dickens to get the 2-
vertical-lines-with-outward-facing-arrows cursor to display at all.

Please advise.
  #2   Report Post  
Fred Holmes
 
Posts: n/a
Default

For the reasons you enumerated, I don't think any one approach will
work. I generally like the vba approach, but it fails (I don't find a
command) to uncheck certain check-boxes. Here's some code that I use
to set the column widths to specific lengths in inches, because I
don't like the Word 2003 Table, Properties interface. In the code,
some long lines have wrapped in this message content.

Sub A_Table_Column_Width_Set()
' Macro to set the width of the current/selected column
Dim w As Variant
If Selection.Information(wdWithInTable) = True Then
w = InputBox(Prompt:="Enter the desired Column Width in inches:",
Title:="Column Width")
Selection.Columns(1).Width = InchesToPoints(w)
Else
Dim Result01
Result01 = MsgBox(Prompt:="The insertion point must be in a
Word Table for this to work.", Title:="Set Column Width in Word
Table.")
End If
End Sub
Sub A_Table_Column_Width_Get()
' Macro to get/report the column width of the current column
If Selection.Information(wdWithInTable) = True Then
MsgBox "The Width of the Cell is " &
PointsToInches(Selection.Cells(1).Width) & " inches."
End If
End Sub
Sub A_Table_Center_Across_Page()
If Selection.Information(wdWithInTable) = True Then
Selection.Tables(1).Rows.Alignment = wdAlignRowCenter
Selection.Tables(1).Rows.LeftIndent = InchesToPoints(0)
Else
Dim Result01
Result01 = MsgBox(Prompt:="The insertion point must be in a
Word Table for this to work.", Title:="Center Table Across Page.")
End If
End Sub

On Wed, 27 Oct 2004 13:33:10 -0700, Kind writer/user/programmer

wrote:

Ultimate goal is to create a predictable ironclad table format.

What's diff tween using a macro (and some VBA fortifications) vs Table
Autoformat (with a customized table style). Each approach has problems:

I defined table cell styles and used a macro, to some degree of
success...however, some settings (heading rows repeat) are toggles; other
items don't "show up" as a VB command/method/object (i.e., format to fit
content, then turn that off so table doesn't automatically resize).

I also customized one of the autoformat table styles to look more or less
like I want.

However, the Autoformat doesn't apply "styles" to cells, so when users use
(for example) Normal, or Heading 1 (autonumbered), the paragraph formatting
in the cells is wrong. Also the checkboxes for first row different (table
head centered tyle) and first column different(table cell bold) style), don't
seem to stick.

And, the table layout is...well, resizing table widths is a new challenge in
Word 2003. The Alt key helps (when resizing), but most often, mousing over a
column divider (vertical line in a table), the cursor blinks from 4-arrow to
white diagonal, and its a dickens to get the 2-
vertical-lines-with-outward-facing-arrows cursor to display at all.

Please advise.


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
Default font - possible bulletproof fix in Word 2003 [email protected] Microsoft Word Help 0 January 14th 05 09:14 PM
In typing dates in Word, i.e. "January 12" how do you keep the "1. Carol Microsoft Word Help 2 January 12th 05 08:09 PM
word xp crashes after macros are recorded kharris0405 Microsoft Word Help 3 January 11th 05 10:50 PM
WordPerfect - copying formatting Morgan Page Layout 1 January 10th 05 05:00 PM
WP Delay Code - Word Equiv Mike G - Milw, WI Microsoft Word Help 6 January 10th 05 04:12 PM


All times are GMT +1. The time now is 01:41 AM.

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

About Us

"It's about Microsoft Word"