need help to create table style...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, all:

I am trying to figure out how to create a table style, so that when I apply the style to the text the text would place itself into 1-row X 2-column table. Initially it appeared that the number of rows and columns that table style generates was arbitrary, but then by trial and error, I figured out that '-' tells the table style to start new column. I can not figure out however what character tells the style to start a new row. Does anybody know. Also, is there any way I can change these 'indicator' characters to something else? Where in hte MS office XP help manual does the relevant information appear? I looked but no luck except just hte general info on tables.

THank you,

Edgar
 
Hi Edgar

I'm not sure how you're going about this, but try the following.

Create a table and put your cursor in it. Format > Styles and Formatting. In
the Styles and Formatting pane, click New Style.

Give your style a name. In the Style Type box, choose Table. In the
Formatting section of this dialog, you'll now see a drop down called "Apply
Formatting To". Choose the element you want (eg Odd Row Stripes, or Left
Column) and choose the formatting you want for that element.

When you're finished, click OK. However, at that point, Word (I'm working in
2003, I think 2002 was the same) won't apply your table style to the table.
In the Styles and Formatting pane, you have to go and fine the name of the
style you just created and click the name of the style. Word will then apply
the style to the table.

To apply your new table style to other tables, do this. Click within the
table. Format > Styles and Formatting. Click on the name of your table
style.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


Edgar Lobachevskiy said:
Hi, all:

I am trying to figure out how to create a table style, so that when I
apply the style to the text the text would place itself into 1-row X
2-column table. Initially it appeared that the number of rows and columns
that table style generates was arbitrary, but then by trial and error, I
figured out that '-' tells the table style to start new column. I can not
figure out however what character tells the style to start a new row. Does
anybody know. Also, is there any way I can change these 'indicator'
characters to something else? Where in hte MS office XP help manual does
the relevant information appear? I looked but no luck except just hte
general info on tables.
 
But note that the table style has nothing to do with how many rows and
columns it has. That's something you have to decide. If you want to save a
completely formatted table with a specific number of rows and columns, this
is best done with an AutoText entry.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
Dear Shauna and Suzanne

Thank you for addressing my question. I followed your instuctions and now I feel more comfortable with styles
Unfortunately, I am still unable to get WORD to do what I want. Perhaps I should give more detailed explanation of what I want to do

Consider the following unformatted plain text
<<
Virus protection is the answer to renewed interest in the threat of e-mail viruses. It blocks programmatic sends and lets users specify if they want to open or save attachments. This option to block the preset list of file types may be accessed via the checkbox under Tools | Options | Security | "Do not allow attachments to be opened orsaved that could potentially be a virus." This option is enabled bydefault for new installations and upgrades.
I would like to create a style that would split this text in half; apply font changes and place first half into 1st colum of teh table adn the second half into the second column of the table.

Do I need to write a macro for this purpose rather than a style or can I call up a macro from a style? How would you approach this problem

thank you

Edga
 
This would have to be done by use of a macro. BUT, how is it decided where
the first half of the text ends?

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
Dear Doug

I would assume that VBA allows a user to do a word count in a text and then determine where the first half of the text ends and the other begins. I am not sure how to do it though

if you have any suggestions please let me know

Edgar
 
The following code will place the first half of the paragraph in which the
selection is located into the first cell of a one row, two column table and
the second half into the second cell

Dim myrange As Range, myrange1 As Range
Set myrange = Selection.Paragraphs(1).Range
Set myrange1 = myrange.Duplicate
myrange.End = myrange.Words(Int(myrange.Words.Count / 2)).End
myrange1.Start = myrange1.Words(Int(myrange1.Words.Count / 2) + 1).Start
ActiveDocument.Tables(1).Cell(1, 1).Range = myrange
ActiveDocument.Tables(1).Cell(1, 2).Range = myrange1


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 
You certainly can't do this with a style, and I'm not sure how you could do
it with a macro. How do you define "first half" and "second half"?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Edgar Lobachevskiy said:
Dear Shauna and Suzanne:

Thank you for addressing my question. I followed your instuctions and
now I feel more comfortable with styles.
Unfortunately, I am still unable to get WORD to do what I want. Perhaps I
should give more detailed explanation of what I want to do:
Consider the following unformatted plain text:
<<<
Virus protection is the answer to renewed interest in the threat of e-mail
viruses. It blocks programmatic sends and lets users specify if they want to
open or save attachments. This option to block the preset list of file
types may be accessed via the checkbox under Tools | Options | Security |
"Do not allow attachments to be opened orsaved that could potentially be a
virus." This option is enabled bydefault for new installations and upgrades.
I would like to create a style that would split this text in half; apply
font changes and place first half into 1st colum of teh table adn the second
half into the second column of the table.
Do I need to write a macro for this purpose rather than a style or can I
call up a macro from a style? How would you approach this problem?
 
Back
Top