Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2006

Tip: Looking for answers? Try searching our database.

Automating Table Of Contents - MailMerge (Word 2003)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Amrish - 16 Nov 2006 02:47 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.