Hi,
I am using Microsoft Word 2003, and i am performing various
mail merge activities on an existing .dot file using C#. And after is insert
files using c# code, i need to update the existing Table Of Contents which is
present in the Template.
The macro code which is executed when we update the TOC is
something like WordBasic.UpdateTableOfContents. I am unable to do something
similar.
I also need to format the TOC like changing the color and font
of the TOC. And to do it, i need to select the TOC. It should be something
like TableOfContents.Range.Select(), but i am unable to get a similar syntax.
Is there any other way to do it?
-Amrish
Amrish - 16 Nov 2006 10:36 GMT
Had actually got the answer.
Its
(ActiveWordDocument).TablesOfContents[1].UpdatePageNumbers(); to update the
TOC
&
(ActiveWordDocument).TablesOfContents[1].Range.Select(); to Select it.
-Amrish
> Hi,
> I am using Microsoft Word 2003, and i am performing various
[quoted text clipped - 12 lines]
>
> -Amrish