Jump to content

Hello,

 

Basically, i have this code that generates a table of contents in a word document.  I am trying to change the range on it to make it appear on the second page of the word doucment.

 

I could use any help!

object oTrueValue = true;            object start = oWord.ActiveDocument.Content.End - 1;            Word.Range rangeForTOC = oDoc.Range(ref start, ref oMissing);            Word.TableOfContents toc = oDoc.TablesOfContents.Add(rangeForTOC, ref oTrueValue, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);            toc.Update();            Word.Range rngTOC = toc.Range;            rngTOC.Font.Size = 12;            rngTOC.Font.Name = "Arial";            rngTOC.Font.Bold = 0;
Link to comment
https://linustechtips.com/topic/221229-c-help-to-change-the-range/
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×