Macro for table problems

J

john

Hi Everybody

I've created a table specifying all the properties in Word for Mac
2004.

Since I use the format for this particular table frequently, I've tried
without success to create a macro for it.

I create a macro, insert Table (2 columns x 1 row), go to Table
Properties, tick Preferred Width box and specify width, specify Indent
from Left, go to Borders and Shading and specify No Borders, but then
find that the Preferred Width and Indent measurements have disappeared.
If I do it in reverse order, and then tab Row, I also lose the ticked
Preferred Width measurements. If I go through and complete the other
specs, and go back to Table, the macro doesn't produce the required
table, but seems to insert some properties of its own, like width of
column.

Since the original table appears in the document, I assume that its
properties are valid.

I'll be indebted for advice.

Many thanks

John
 
D

Daiya Mitchell

J

john

Thanks, Dailya. The reason I tried a macro (which MIcrosoft Support
recommended) was that I'd alrady tried Autotext. When I used this, it
produced borders although the table I'd selected had none, and (if I
remember correctly) it didn't have bold in one column as did the
selected table.

John
 
J

john

Hi Beth

No. I wasn't seeing grey lines, but solid black ones that printed.
But I'll try AutoCorrect instead.

Many thanks

John
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi John:

You do NOT want to do the macro! Here's why... (Yes, it works :))

Sub Main()
'
' Insert or Format Table Macro
' Macro recorded 14/03/00 by John McGhie
'
' On Error GoTo Error

Dim astyle As Style
Dim aDoc As String
Dim aTemplate As String
Dim x As Integer
Dim TabBodyText As Style
Dim TabHeading As Style
Dim TabBullet As Style
Dim tabNumber As Style


aTemplate = ActiveDocument.AttachedTemplate.FullName
aDoc = ActiveDocument.FullName
For Each astyle In ActiveDocument.Styles
If UCase(astyle.NameLocal) = UCase("Table Body Text") Then Set
TabBodyText = astyle
If UCase(astyle.NameLocal) = UCase("Table Bullet") Then Set TabBullet =
astyle
If UCase(astyle.NameLocal) = UCase("Table Heading") Then Set TabHeading
= astyle
If UCase(astyle.NameLocal) = UCase("Table Number") Then Set tabNumber =
astyle
Next astyle

If TabBodyText Is Nothing Then
ActiveDocument.Styles.Add Name:="Table Body Text"
Set TabBodyText = ActiveDocument.Styles("Table Body Text")
With TabBodyText
.AutomaticallyUpdate = False
.BaseStyle = "Body Text"
.NextParagraphStyle = "Table Body Text"
End With
With TabBodyText.Font
.Name = BodyFont
.Size = 10
.Bold = False
.Italic = False
End With
With TabBodyText.ParagraphFormat
.LeftIndent = 0
.RightIndent = 0
.SpaceBefore = 2
.SpaceBeforeAuto = False
.SpaceAfter = 2
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = False
.KeepWithNext = False
.KeepTogether = True
.PageBreakBefore = False
.FirstLineIndent = 0
.OutlineLevel = wdOutlineLevelBodyText
End With
End If

If TabHeading Is Nothing Then
ActiveDocument.Styles.Add Name:="Table Heading"
Set TabHeading = ActiveDocument.Styles("Table Heading")
With TabHeading
.AutomaticallyUpdate = False
.BaseStyle = "Table Body Text"
.NextParagraphStyle = "Table Heading"
End With
With TabHeading.Font
.Name = HeadingFont
.Size = 10
.Bold = True
.Italic = False
End With
With TabHeading.ParagraphFormat
.LeftIndent = 0
.RightIndent = 0
.SpaceBefore = 2
.SpaceBeforeAuto = False
.SpaceAfter = 2
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = False
.KeepWithNext = True
.KeepTogether = True
.PageBreakBefore = False
.FirstLineIndent = 0
.OutlineLevel = wdOutlineLevelBodyText
End With
End If

If TabBullet Is Nothing Then
ActiveDocument.Styles.Add Name:="Table Bullet"
Set TabBullet = ActiveDocument.Styles("Table Bullet")
With TabBullet
.AutomaticallyUpdate = False
.BaseStyle = "Table Body Text"
.NextParagraphStyle = "Table Bullet"
End With
With TabBullet.Font
.Name = BodyFont
.Size = 10
.Bold = False
.Italic = False
End With
With TabBullet.ParagraphFormat
.LeftIndent = 22
.RightIndent = 0
.SpaceBefore = 0
.SpaceBeforeAuto = False
.SpaceAfter = 5
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = True
.KeepWithNext = False
.KeepTogether = False
.PageBreakBefore = False
.FirstLineIndent = -17
.OutlineLevel = wdOutlineLevelBodyText
End With
TabBullet.ParagraphFormat.TabStops.ClearAll
TabBullet.ParagraphFormat.TabStops.Add _
Position:=22, Alignment:=wdAlignTabLeft, Leader:= _
wdTabLeaderSpaces
With ListGalleries(wdBulletGallery).ListTemplates(7).ListLevels(1)
.NumberFormat = ChrW(61623)
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleBullet
.NumberPosition = 6
.Alignment = wdListLevelAlignLeft
.TextPosition = 22
.TabPosition = 22
.ResetOnHigher = 0
.StartAt = 1
.Font.Name = "Symbol"
.LinkedStyle = "Table Bullet"
End With
End If

If tabNumber Is Nothing Then
ActiveDocument.Styles.Add Name:="Table Number"
Set tabNumber = ActiveDocument.Styles("Table Number")

With tabNumber
.AutomaticallyUpdate = False
.BaseStyle = "Table Bullet"
.NextParagraphStyle = "Table Number"
End With
With tabNumber.Font
.Name = BodyFont
.Size = 10
.Bold = False
.Italic = False
End With
With tabNumber.ParagraphFormat
.LeftIndent = 22
.RightIndent = 0
.SpaceBefore = 0
.SpaceBeforeAuto = False
.SpaceAfter = 2
.SpaceAfterAuto = False
.LineSpacingRule = wdLineSpaceSingle
.Alignment = wdAlignParagraphLeft
.WidowControl = True
.KeepWithNext = False
.KeepTogether = False
.PageBreakBefore = False
.FirstLineIndent = -17
.OutlineLevel = wdOutlineLevelBodyText
End With
tabNumber.ParagraphFormat.TabStops.ClearAll
tabNumber.ParagraphFormat.TabStops.Add _
Position:=22, Alignment:=wdAlignTabLeft, Leader:= _
wdTabLeaderSpaces
With ListGalleries(wdNumberGallery).ListTemplates(7).ListLevels(1)
.NumberFormat = "%1."
.TrailingCharacter = wdTrailingTab
.NumberStyle = wdListNumberStyleArabic
.NumberPosition = 6
.Alignment = wdListLevelAlignLeft
.TextPosition = 22
.TabPosition = 22
.ResetOnHigher = 0
.StartAt = 1
.LinkedStyle = "Table Number"
End With
End If

If Not Selection.Information(wdWithInTable) Then
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=5,
NumColumns:= _
3, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
End If

Dim aTable As Table
Set aTable = Selection.Tables(1)

aTable.Select
aTable.AutoFormat Format:=wdTableFormatGrid5, ApplyBorders:= _
True, ApplyShading:=True, ApplyFont:=False, ApplyColor:=False, _
ApplyHeadingRows:=True, ApplyLastRow:=False,
ApplyFirstColumn:=False, _
ApplyLastColumn:=False, AutoFit:=True

aTable.Select

With Selection
.Rows.AllowBreakAcrossPages = False
.Paragraphs.Reset
.Font.Reset
.Style = ActiveDocument.Styles("Table Body Text")
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth075pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderRight)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth075pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth075pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth075pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderHorizontal)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth025pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderVertical)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth025pt
.Color = wdColorAutomatic
End With
.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With
With Options
.DefaultBorderLineStyle = wdLineStyleSingle
.DefaultBorderLineWidth = wdLineWidth025pt
.DefaultBorderColor = wdColorAutomatic
End With

aTable.Rows(1).Select
With Selection
.Style = ActiveDocument.Styles("Table Heading")
.Rows(1).HeadingFormat = True
With .Shading
.Texture = wdTexture10Percent
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
End With

aTable.AutoFitBehavior (wdAutoFitWindow)

End

Error:
MsgBox "The Template has been damaged. See Tech Support.", vbCritical

End Sub



Hi Beth

No. I wasn't seeing grey lines, but solid black ones that printed.
But I'll try AutoCorrect instead.

Many thanks

John

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
J

john

Hi John

Maybe I'm dumb, but I didn't understand what that progamming language
meant or why the macro does not work.

But if it doesn't work, then what is the best way to insert a specific
table format that I use repeatedly?

John
 
J

john

Hi John

Maybe I'm dumb, but I didn't understand what that progamming language
meant or why the macro does not work.

But if it doesn't work, then what is the best way to insert a specific
table format that I use repeatedly?

John
 
C

Clive Huggan

On 9/10/06 11:48 PM, in article
(e-mail address removed), "(e-mail address removed)"

... what is the best way to insert a specific
table format that I use repeatedly?

John
Hello John,

One way, by AutoText, is described blow-by-blow under the heading 'Example ‹
creating and inserting a pre-formatted table via AutoText' on page 124 of
some notes on the way I use Word for the Mac, titled "Bend Word to Your
Will", which are available as a free download from the Word MVPs' website
(http://word.mvps.org/Mac/Bend/BendWordToYourWill.html).

[Note: "Bend Word to your will" is designed to be used electronically and
most subjects are self-contained dictionary-style entries. If you decide to
read more widely than the item I've referred to, it's important to read the
front end of the document -- especially pages 3 and 5 -- so you can select
some Word settings that will allow you to use the document effectively.]

Cheers,

Clive Huggan
Canberra, Australia
(My time zone is 5-11 hours different from the US and Europe, so my
follow-on responses to those regions can be delayed)
============================================================
Avoid long delays before your post appears -- use Entourage or newsreader
software -- see http://word.mvps.org/Mac/AccessNewsgroups.html
============================================================
 
J

John McGhie [MVP - Word and Word Macintosh]

If you pasted directly from your browser into the Visual Basic Editor, it
would convert the "spaces" into "non-breaking spaces". These are different
characters: a non-breaking space is significant in VBA.

To fix that, paste the code into SimpleText, save as Text Only, re-open it,
and paste from there. Then, any line that turns red has been folded over.
Delete the line-ender at the end of the first red line until it joins the
line below it. That should fix it.

Let me do that bit for you: There's a little attachment on this post. Save
it to your hard drive. In the VBA Editor, go to the Insert menu, choose
"File" and select this file. It will import into the Visual Basic Editor
correctly for you.

And no, you are not dumb: but that's a fairly advanced piece of code. Not
recommended for your first venture into VBA :)

Now, do what Clive says: it's a LOT easier :)

Cheers

Hi John

Maybe I'm dumb, but I didn't understand what that progamming language
meant or why the macro does not work.

But if it doesn't work, then what is the best way to insert a specific
table format that I use repeatedly?

John

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
J

john

Hi Beth

I tried this and it worked while the document was open. But when I
saved the document, quit Word, opened again, and tried the Autocorrect,
it produced the table but with borders.

This is what happened with Autotext. Once I save the document, somehow
a defafult of a standard border for the table seems to override my
specs.

Since everyone says that a macro will corrupt, I really would
appreciate learning what I should do.

Many thanks

John
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi John:

Go to Table>Insert>Table and insert a table to your satisfaction. Make sure
you check the box that says "Set as default for new tables".

Now hold down either Shift key and choose "Save All" to force a save of both
the document and the template. That saves the specification for tables like
the one you just produced.

Now go to Tools>Templates and Add-ins and make sure "Automatically update
styles on open" is NOT checked. If it is, it will update your table style
each time you open the document, and if your default table style has
borders, then borders you will have -- every time :)

If you save this as an Autocorrect, make sure you set "With" to "Formatted
Text" otherwise it won't work properly.

Cheers


Hi Beth

I tried this and it worked while the document was open. But when I
saved the document, quit Word, opened again, and tried the Autocorrect,
it produced the table but with borders.

This is what happened with Autotext. Once I save the document, somehow
a defafult of a standard border for the table seems to override my
specs.

Since everyone says that a macro will corrupt, I really would
appreciate learning what I should do.

Many thanks

John

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
J

john

Hi John

I tried this. When I Saved All it asked me did I want to save changes
to template, I said yes. But same result. With a new document
AutoCorrect produced the table with all the properties EXCEPT it gave
it a (what I assumed was the previous default) border.

John
 
J

john

Clive

Do I take it that I am "the OP"?

I confess that I DID read your article several times, once with a
colleague who is more technically experienced than me, and we both had
difficulty following it. To a non-techie it isn't straightforward. For
what it's worth we did try and follow John's steps and include an
adjacent paragraph mark (which I managed to pick out of your article),
but it still didn't work.

Please don't assume we non-techies want everything on a plate. I have
spent several hours trying to follow the various advices. Blame my
stupidity, but not my lack of effort.

John
Clive said:
"I think one problem you're having is that you are trying to avoid getting
into the detail"

This would be supported by the OP apparently not bothering to look at the
reference I gave to the article in which I describe a series of steps in
detail to make customized tables an AutoText item. The only complexity, if
it is that, is involved in the table example initially chosen, and I discuss
the various pros and cons about the design alternatives to make the choice
appropriate to one's requirements. Additionally, by including an adjacent
paragraph mark the method avoids problems that particularly occur when
copying and pasting because of a bug in the Table style introduced in Word
2004. And so on. Why don't I post it here? Because it is longer than the
usual post and because I would be unable to include an actual example.

Still, the next version of Word will cater to those who don't want to get
into the detail. Maybe the OP should wait till then... :-\

Clive Huggan
==============



Hi John:

Before saving your table as an AutoText, select the table and use
Format>Style to Apply "Table Normal" style.

I suspect you have a Table style applied and have not realised it. Table
Styles were new in Word 2004. They are quite hard to get rid of once you
have a table style stuck in use.

1) Basically, create a blank document, then insert a new table.

2) Use Table>Insert>Table....

3) Make sure you choose AutoFormat and set it to (none) -- which is right at
the top of the list.

4) Now select the entire table and choose Format>Style

5) Choose the "Table Normal" style and Apply

Save THAT as your AutoText or AutoCorrect and the borders should go away and
stay away.

There's three sources of formatting for a table in Word: The Format>Borders
and Shading dialog, the Table>...>AutoFormat dialog, and the Format>Style...
Dialog. You have to set "None" in all three to kill the unwanted borders.

Read the following Word help topics:
"About borders and shading"
"Add a border to a table or group of cells"
"Change a border in a table"
"What types of styles can you create and apply?"
"Create a new table style"

I think one problem you're having is that you are trying to avoid getting
into the detail. But you're in a complex area: digging a little deeper will
enable you to understand the tools involved a lot better.

Cheers

Hi John

I tried this. When I Saved All it asked me did I want to save changes
to template, I said yes. But same result. With a new document
AutoCorrect produced the table with all the properties EXCEPT it gave
it a (what I assumed was the previous default) border.

John

John McGhie [MVP - Word and Word Macintosh] wrote:
Hi John:

Go to Table>Insert>Table and insert a table to your satisfaction. Make sure
you check the box that says "Set as default for new tables".

Now hold down either Shift key and choose "Save All" to force a save of both
the document and the template. That saves the specification for tables like
the one you just produced.

Now go to Tools>Templates and Add-ins and make sure "Automatically update
styles on open" is NOT checked. If it is, it will update your table style
each time you open the document, and if your default table style has
borders, then borders you will have -- every time :)

If you save this as an Autocorrect, make sure you set "With" to "Formatted
Text" otherwise it won't work properly.

Cheers


On 11/10/06 6:03 AM, in article
(e-mail address removed), "(e-mail address removed)"

Hi Beth

I tried this and it worked while the document was open. But when I
saved the document, quit Word, opened again, and tried the Autocorrect,
it produced the table but with borders.

This is what happened with Autotext. Once I save the document, somehow
a defafult of a standard border for the table seems to override my
specs.

Since everyone says that a macro will corrupt, I really would
appreciate learning what I should do.

Many thanks

John

Beth Rosengard wrote:
Hi John,

I always use AutoCorrect instead of AutoText for these things (habit). I
just tried it with a table that had no borders at all and with bold in
just
one cell. It reproduces fine.

I don't know why AutoText isn't working for you but try AutoCorrect and
see
if it makes a difference.

By the way, when you get rid of table borders, they turn gray; they don't
actually disappear (except when you print). Could that be what you're
seeing?

--
***Please always reply to the newsgroup!***

Beth Rosengard
MacOffice MVP

Mac Word FAQ: <http://word.mvps.org/Mac/WordMacHome.html>
My Site: <http://www.bethrosengard.com>




On 10/8/06 8:18 AM, in article
(e-mail address removed), "(e-mail address removed)"

Thanks, Dailya. The reason I tried a macro (which MIcrosoft Support
recommended) was that I'd alrady tried Autotext. When I used this, it
produced borders although the table I'd selected had none, and (if I
remember correctly) it didn't have bold in one column as did the
selected table.

John


--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
C

Clive Huggan

Thanks for your response, John. That's useful to know. It's otherwise
difficult to know whether to continue contributing if there is no response
to a post, even an oblique one, from the original poster ( = "OP", which I
used because there are two Johns in the thread).

Here's a follow-on suggestion: remove the visibility of the horizontal lines
(borders) in the sample table on page 124 of "Bend Word to Your Will" and
select and copy the paragraph marks and the table, collectively. Paste that
into a new blank document. Select again, then create an AutoText item. Does
your problem persist? It *may* not, since you are creating the item from a
contributed sample -- one which among several other characteristics does not
contain Word 2004's default Table style that brings its own share of
problems.

If the problem does persist after that, then John McGhie's hypothesis that
you have a corrupted document or Normal template is endorsed, or the problem
applies to your particular configuration. The phenomenon you describe has
certainly not been described before, and will be interesting to come to
grips with.

If you or your colleagues have time in due course -- and inclination -- to
give me feedback on my article on tables as AutoText items, I'd be grateful.
Most of those articles incorporate a lot of feedback from this NG -- which
is a good thing, because after a while one loses the ability to see the
shortcomings, or to describe with sufficient simplicity, as it is a constant
challenge to describe simply the wonderful configurability (and foibles) of
Word...

Cheers,

Clive Huggan
============


Clive

Do I take it that I am "the OP"?

I confess that I DID read your article several times, once with a
colleague who is more technically experienced than me, and we both had
difficulty following it. To a non-techie it isn't straightforward. For
what it's worth we did try and follow John's steps and include an
adjacent paragraph mark (which I managed to pick out of your article),
but it still didn't work.

Please don't assume we non-techies want everything on a plate. I have
spent several hours trying to follow the various advices. Blame my
stupidity, but not my lack of effort.

John
Clive said:
"I think one problem you're having is that you are trying to avoid getting
into the detail"

This would be supported by the OP apparently not bothering to look at the
reference I gave to the article in which I describe a series of steps in
detail to make customized tables an AutoText item. The only complexity, if
it is that, is involved in the table example initially chosen, and I discuss
the various pros and cons about the design alternatives to make the choice
appropriate to one's requirements. Additionally, by including an adjacent
paragraph mark the method avoids problems that particularly occur when
copying and pasting because of a bug in the Table style introduced in Word
2004. And so on. Why don't I post it here? Because it is longer than the
usual post and because I would be unable to include an actual example.

Still, the next version of Word will cater to those who don't want to get
into the detail. Maybe the OP should wait till then... :-\

Clive Huggan
==============



Hi John:

Before saving your table as an AutoText, select the table and use
Format>Style to Apply "Table Normal" style.

I suspect you have a Table style applied and have not realised it. Table
Styles were new in Word 2004. They are quite hard to get rid of once you
have a table style stuck in use.

1) Basically, create a blank document, then insert a new table.

2) Use Table>Insert>Table....

3) Make sure you choose AutoFormat and set it to (none) -- which is right at
the top of the list.

4) Now select the entire table and choose Format>Style

5) Choose the "Table Normal" style and Apply

Save THAT as your AutoText or AutoCorrect and the borders should go away and
stay away.

There's three sources of formatting for a table in Word: The Format>Borders
and Shading dialog, the Table>...>AutoFormat dialog, and the Format>Style...
Dialog. You have to set "None" in all three to kill the unwanted borders.

Read the following Word help topics:
"About borders and shading"
"Add a border to a table or group of cells"
"Change a border in a table"
"What types of styles can you create and apply?"
"Create a new table style"

I think one problem you're having is that you are trying to avoid getting
into the detail. But you're in a complex area: digging a little deeper will
enable you to understand the tools involved a lot better.

Cheers

On 12/10/06 3:37 AM, in article
(e-mail address removed), "(e-mail address removed)"

Hi John

I tried this. When I Saved All it asked me did I want to save changes
to template, I said yes. But same result. With a new document
AutoCorrect produced the table with all the properties EXCEPT it gave
it a (what I assumed was the previous default) border.

John

John McGhie [MVP - Word and Word Macintosh] wrote:
Hi John:

Go to Table>Insert>Table and insert a table to your satisfaction. Make
sure
you check the box that says "Set as default for new tables".

Now hold down either Shift key and choose "Save All" to force a save of
both
the document and the template. That saves the specification for tables
like
the one you just produced.

Now go to Tools>Templates and Add-ins and make sure "Automatically update
styles on open" is NOT checked. If it is, it will update your table style
each time you open the document, and if your default table style has
borders, then borders you will have -- every time :)

If you save this as an Autocorrect, make sure you set "With" to "Formatted
Text" otherwise it won't work properly.

Cheers


On 11/10/06 6:03 AM, in article
(e-mail address removed),
"(e-mail address removed)"

Hi Beth

I tried this and it worked while the document was open. But when I
saved the document, quit Word, opened again, and tried the Autocorrect,
it produced the table but with borders.

This is what happened with Autotext. Once I save the document, somehow
a defafult of a standard border for the table seems to override my
specs.

Since everyone says that a macro will corrupt, I really would
appreciate learning what I should do.

Many thanks

John

Beth Rosengard wrote:
Hi John,

I always use AutoCorrect instead of AutoText for these things (habit).
I
just tried it with a table that had no borders at all and with bold in
just
one cell. It reproduces fine.

I don't know why AutoText isn't working for you but try AutoCorrect and
see
if it makes a difference.

By the way, when you get rid of table borders, they turn gray; they
don't
actually disappear (except when you print). Could that be what you're
seeing?

--
***Please always reply to the newsgroup!***

Beth Rosengard
MacOffice MVP

Mac Word FAQ: <http://word.mvps.org/Mac/WordMacHome.html>
My Site: <http://www.bethrosengard.com>




On 10/8/06 8:18 AM, in article
(e-mail address removed),
"(e-mail address removed)"

Thanks, Dailya. The reason I tried a macro (which MIcrosoft Support
recommended) was that I'd alrady tried Autotext. When I used this, it
produced borders although the table I'd selected had none, and (if I
remember correctly) it didn't have bold in one column as did the
selected table.

John


--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
J

john

Thanks, Clive, and also Beth, John, Daiya, and the other professionals
who freely give your time to helping us non-techies. Greatly
appreciated.

The reason that I don't respond immediately to every suggestion is that
I have to earn a living as a writer, and that isn't a 9-5 job. So to
read all the suggestions and the articles referrred to, and then (in
this case) spend hours trying them out, has to be spread over several
days.

Two items of feedback:

1. Although I downloaded your electronic reference book, when I tried
to print the other articles referred to, both Safari and Firefox would
print only the first page. (I've given this feedback to the MVP
webpage a couple of times in the past, with no response.). It's
helpful for me to have a printout because I can read the articles when
I'm not at my computer.

2. I suspect most non-techies like myself feel it's way over our heads,
and sometimes confusing, to be told in detail the possible technical
reasons why something hasn't worked. What we would most appreciate is
a simple Step by Step (missing out no assumed steps) guide to a
possible solution. This applies to your article.

Again, thanks to all of you for your time. I'm still reading and will
attempt solutions.

John

Clive said:
Thanks for your response, John. That's useful to know. It's otherwise
difficult to know whether to continue contributing if there is no response
to a post, even an oblique one, from the original poster ( = "OP", which I
used because there are two Johns in the thread).

Here's a follow-on suggestion: remove the visibility of the horizontal lines
(borders) in the sample table on page 124 of "Bend Word to Your Will" and
select and copy the paragraph marks and the table, collectively. Paste that
into a new blank document. Select again, then create an AutoText item. Does
your problem persist? It *may* not, since you are creating the item from a
contributed sample -- one which among several other characteristics does not
contain Word 2004's default Table style that brings its own share of
problems.

If the problem does persist after that, then John McGhie's hypothesis that
you have a corrupted document or Normal template is endorsed, or the problem
applies to your particular configuration. The phenomenon you describe has
certainly not been described before, and will be interesting to come to
grips with.

If you or your colleagues have time in due course -- and inclination -- to
give me feedback on my article on tables as AutoText items, I'd be grateful.
Most of those articles incorporate a lot of feedback from this NG -- which
is a good thing, because after a while one loses the ability to see the
shortcomings, or to describe with sufficient simplicity, as it is a constant
challenge to describe simply the wonderful configurability (and foibles) of
Word...

Cheers,

Clive Huggan
============


Clive

Do I take it that I am "the OP"?

I confess that I DID read your article several times, once with a
colleague who is more technically experienced than me, and we both had
difficulty following it. To a non-techie it isn't straightforward. For
what it's worth we did try and follow John's steps and include an
adjacent paragraph mark (which I managed to pick out of your article),
but it still didn't work.

Please don't assume we non-techies want everything on a plate. I have
spent several hours trying to follow the various advices. Blame my
stupidity, but not my lack of effort.

John
Clive said:
"I think one problem you're having is that you are trying to avoid getting
into the detail"

This would be supported by the OP apparently not bothering to look at the
reference I gave to the article in which I describe a series of steps in
detail to make customized tables an AutoText item. The only complexity, if
it is that, is involved in the table example initially chosen, and I discuss
the various pros and cons about the design alternatives to make the choice
appropriate to one's requirements. Additionally, by including an adjacent
paragraph mark the method avoids problems that particularly occur when
copying and pasting because of a bug in the Table style introduced in Word
2004. And so on. Why don't I post it here? Because it is longer than the
usual post and because I would be unable to include an actual example.

Still, the next version of Word will cater to those who don't want to get
into the detail. Maybe the OP should wait till then... :-\

Clive Huggan
==============



On 12/10/06 8:54 PM, in article C1545C12.4E2B0%[email protected], "John

Hi John:

Before saving your table as an AutoText, select the table and use
Format>Style to Apply "Table Normal" style.

I suspect you have a Table style applied and have not realised it. Table
Styles were new in Word 2004. They are quite hard to get rid of once you
have a table style stuck in use.

1) Basically, create a blank document, then insert a new table.

2) Use Table>Insert>Table....

3) Make sure you choose AutoFormat and set it to (none) -- which is right at
the top of the list.

4) Now select the entire table and choose Format>Style

5) Choose the "Table Normal" style and Apply

Save THAT as your AutoText or AutoCorrect and the borders should go away and
stay away.

There's three sources of formatting for a table in Word: The Format>Borders
and Shading dialog, the Table>...>AutoFormat dialog, and the Format>Style...
Dialog. You have to set "None" in all three to kill the unwanted borders.

Read the following Word help topics:
"About borders and shading"
"Add a border to a table or group of cells"
"Change a border in a table"
"What types of styles can you create and apply?"
"Create a new table style"

I think one problem you're having is that you are trying to avoid getting
into the detail. But you're in a complex area: digging a little deeper will
enable you to understand the tools involved a lot better.

Cheers

On 12/10/06 3:37 AM, in article
(e-mail address removed), "(e-mail address removed)"

Hi John

I tried this. When I Saved All it asked me did I want to save changes
to template, I said yes. But same result. With a new document
AutoCorrect produced the table with all the properties EXCEPT it gave
it a (what I assumed was the previous default) border.

John

John McGhie [MVP - Word and Word Macintosh] wrote:
Hi John:

Go to Table>Insert>Table and insert a table to your satisfaction. Make
sure
you check the box that says "Set as default for new tables".

Now hold down either Shift key and choose "Save All" to force a save of
both
the document and the template. That saves the specification for tables
like
the one you just produced.

Now go to Tools>Templates and Add-ins and make sure "Automatically update
styles on open" is NOT checked. If it is, it will update your table style
each time you open the document, and if your default table style has
borders, then borders you will have -- every time :)

If you save this as an Autocorrect, make sure you set "With" to "Formatted
Text" otherwise it won't work properly.

Cheers


On 11/10/06 6:03 AM, in article
(e-mail address removed),
"(e-mail address removed)"

Hi Beth

I tried this and it worked while the document was open. But when I
saved the document, quit Word, opened again, and tried the Autocorrect,
it produced the table but with borders.

This is what happened with Autotext. Once I save the document, somehow
a defafult of a standard border for the table seems to override my
specs.

Since everyone says that a macro will corrupt, I really would
appreciate learning what I should do.

Many thanks

John

Beth Rosengard wrote:
Hi John,

I always use AutoCorrect instead of AutoText for these things (habit).
I
just tried it with a table that had no borders at all and with bold in
just
one cell. It reproduces fine.

I don't know why AutoText isn't working for you but try AutoCorrect and
see
if it makes a difference.

By the way, when you get rid of table borders, they turn gray; they
don't
actually disappear (except when you print). Could that be what you're
seeing?

--
***Please always reply to the newsgroup!***

Beth Rosengard
MacOffice MVP

Mac Word FAQ: <http://word.mvps.org/Mac/WordMacHome.html>
My Site: <http://www.bethrosengard.com>




On 10/8/06 8:18 AM, in article
(e-mail address removed),
"(e-mail address removed)"

Thanks, Dailya. The reason I tried a macro (which MIcrosoft Support
recommended) was that I'd alrady tried Autotext. When I used this, it
produced borders although the table I'd selected had none, and (if I
remember correctly) it didn't have bold in one column as did the
selected table.

John


--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi John:

That's a good point you raise, and I believe we owe you an explanation of
why we do things differently :)

One of the most cogent criticisms of the Microsoft Word help is that it does
exactly what you ask. It tells users what to do; it never tells them why,
or how the mechanism works.

They do this on purpose, and research has proved time and again that this
strategy best suits around 80 per cent of computer users. Like yourself,
they just want to be told what to do.

However, at word.mvps.org, our target audience is the "other" 20 per cent.
These are users who either want or need the technical detail.

If we set out to tell users WHAT to do for each problem, we will be correct
around 80 per cent of the time. If the problem is exactly what we think it
is, and the user's computer is exactly how they say it is, and the user does
exactly what we tell them, the solution will work.

However, in something more than 30 per cent of cases, one or more of the
previous four conditions is not exactly true. Under those circumstances,
the procedure won't work. And if that's all we have told the user, they're
left with nowhere to go. You get a 30 per cent failure rate.

Our articles intentionally provide as much detail as we have. No matter how
minor or obscure, if it's at all likely to be relevant, we include it if we
have it. Combined with the user's native ingenuity, this produces articles
that are far more resilient in real-world usage. Our articles will cope
with 95 to 98 per cent of the possible problems within their subject area.

Yes, they're more complex. Yes, it takes longer. And Yes, our articles
suit an enthusiast or professional audience. They're not so suitable for
the new or amateur user.

We do this quite intentionally. We see our site as picking up where he
Microsoft Help and Microsoft Knowledgebase articles leave off, and trying to
take the user the rest of the way. Microsoft is a public corporation: it
has a duty to its shareholders not to waste money trying to serve the 20 per
cent of users for whom standard articles are insufficient. We are a bunch
of enthusiasts and hobbyists. Many of us are *also* professionals in this
field. We write articles for people like us. We pride ourselves on giving
you the answers that Microsoft can't or won't.

Remember that many of the contributors of those articles are Microsoft MVPs.
To become an MVP, it is necessary to know more about your chosen product
than most of the people working for Microsoft do. Our articles tend to
reflect this :)

HOWEVER: Your comments are very valuable, in that they remind us (once
again) of the need for us to explain things properly when we're trying to
help people who do not have either the interest or the inclination for
in-depth technical work.

I have already apologised to you privately for leaving you hanging in a
tangle of technical detail. I'll do it again publicly! I should have
recognised straight off the bat that you were a user who neither needed nor
wanted the technical detail. I should have sent you a set of numbered
steps. Worse: I knew that at the time! I'm sorry, I was tired and
stressed after a heavy day of doing this stuff for a living, so my first
answers to you were cryptic and inadequate to their audience.

I told myself "I've done the right thing. I have sent him the missing piece
of information. He has everything he needs if he assembles the pieces."
But I was fooling myself. I didn't tell you how to fit the pieces together,
and I did not tell you in which order to do it. So I left you hanging. For
which, I apologise!

Cheers


2. I suspect most non-techies like myself feel it's way over our heads,
and sometimes confusing, to be told in detail the possible technical
reasons why something hasn't worked. What we would most appreciate is
a simple Step by Step (missing out no assumed steps) guide to a
possible solution. This applies to your article.

Again, thanks to all of you for your time. I'm still reading and will
attempt solutions.

John
--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Business Analyst, Consultant
Technical Writer.
Sydney, Australia +61 (0) 4 1209 1410
 
J

john

Hi John

It's very generous of you, but there's no need to apologize.

However, I do appreciate your explanation. I wonder, though, if there
isn't a gap here.

I only post a question on this site after I've exhaused the Word Help
and Office Assistant and come up with no solution. And in one case
after phoning up Microsoft Help at their exhorbitant rates. And I can
confirm that you guys know FAR more than the Microsoft Help people.

But I do feel over my head if too much technical detail is given, with
assumptions that we non-techies know how to handle it. So my plea is
for you to speak to us at our reasonably intelligent but non-expert
level, rather than expert to expert.

Since you've repeated your private apology, let me repeat my private
thanks for the great help you've sent to me directly.

Best wishes

John
 
J

john

Hi Beth

This is a mystery. I print out other long articles from other sites
with no problem.

But if I paste

http://word.mvps.org/FAQs/Customization/AutoText.htm

into Safari I get a blank screen.

If I paste into Firefox I get the full article. But if I try and print
I get only the first page. The Print Preview looks weird. I've done
a window grab of the image and will try and attach it to this message.

Thanks

John

Snapshot 2006-10-17 19-42-09.tiff

PS: It only seems to want to paste the title and not the file.
 
P

Paul Berkowitz

This is a mystery. I print out other long articles from other sites
with no problem.

But if I paste

http://word.mvps.org/FAQs/Customization/AutoText.htm

into Safari I get a blank screen.

No mystery. Just refresh the page a few times in Safari.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top