TOC Question

S

S Shulman

Hi

I use this method (Selection.Fields.Add) to add an entry in the document for
the Table of Contents that is then generated by the program, however I want
to make some in the TOC Bold.

Thank you in advance,
Shmuel Shulman
SBS Technologies LTD
 
J

Jean-Guy Marcil

S Shulman was telling us:
S Shulman nous racontait que :
Hi

I use this method (Selection.Fields.Add) to add an entry in the
document for the Table of Contents that is then generated by the
program, however I want to make some in the TOC Bold.

More details are needed if you want anybody to write a useful response.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
S

S Shulman

I create a TOC which is not based on the style of the text but rather an
explicit TOC fields these I insert using the 'Selection.Fields.Add' method
(see exaple below)

Then I call another method to actually create the TOC

So far every thing is OK

But, I want to have some lines within the TOC in bold text

And the question is: How can I do that?

Shmuel Shulman
SBS Technologies LTD
 
J

Jean-Guy Marcil

S Shulman was telling us:
S Shulman nous racontait que :
I create a TOC which is not based on the style of the text but rather
an explicit TOC fields these I insert using the
'Selection.Fields.Add' method (see exaple below)

Then I call another method to actually create the TOC

So far every thing is OK

But, I want to have some lines within the TOC in bold text

And the question is: How can I do that?

What is the logic to decide which line in the TOC get bolded?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
S

S Shulman

There is no logic like every second line it is just that some sections of
the document are more important
 
J

Jean-Guy Marcil

S Shulman was telling us:
S Shulman nous racontait que :
There is no logic like every second line it is just that some
sections of the document are more important

A VBA program can't really make conceptual judgement calls. So I am afraid
that you cannot use VBA to bold some of the line in the TOC.

However, if you can use a style in the document to format those "important"
parts, than you can associate that style with a level in the TOC and format
that level as bold.

So, your TOC field could look like:

{TOC \f \h \t "MyStyle;1"}

where the f switch uses the TC fields and the t switch uses the style
associated with the important stuff. Here, you would bold the TOC 1 style.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
S

S Shulman

Merci
Thank you

Shmuel

Jean-Guy Marcil said:
S Shulman was telling us:
S Shulman nous racontait que :


A VBA program can't really make conceptual judgement calls. So I am afraid
that you cannot use VBA to bold some of the line in the TOC.

However, if you can use a style in the document to format those
"important" parts, than you can associate that style with a level in the
TOC and format that level as bold.

So, your TOC field could look like:

{TOC \f \h \t "MyStyle;1"}

where the f switch uses the TC fields and the t switch uses the style
associated with the important stuff. Here, you would bold the TOC 1 style.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

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