Link to home
Start Free TrialLog in
Avatar of mte01
mte01Flag for Lebanon

asked on

table in word (vb.net ) repeat the header

Hi,
i am inserting a table into a word document, using this code:
oTable = doc.Range.Tables.Add(doc.Range.Bookmarks.Item("\endofdoc").Range, 4, 2)
......

i need the first row (the header of the table) to be repeated if we went into a new page..
is that dooable??
thanks
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

1) Maybe if this was Excel we could manage, but I don't think that Word has that ability.  You would have to do some magic on your own, if that's true.

2) The Word topic area is here, if you want to double-check me:

https://www.experts-exchange.com/Applications/MS_Office/Word/

Bob
Avatar of mte01

ASKER

>>TheLearnedOne

I'll be waiting for comments from other experts....
SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mte01

ASKER

i think that u where wrong again ;)  (hopefully not)

sadly this didnt work with me!
oTable.Rows.HeadingFormat = Word.WdConstants.wdToggle

unless i did something wrong!
thanks bob
The Word object model is very confusing, and takes time to get to know all of it's subtle nuances.

The process in Word is to select the table, and check the menu option.  So, is the table the current selection?

Bob
Avatar of mte01

ASKER

how do i select it? since i already have a reference to it..
which is the oTable
can u post ur code if it's possible??
thanks
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mte01

ASKER

it worked
thanks
Avatar of mte01

ASKER

>>omegaomega

Can you please help in the following question: http:Q_21843172.html  ...thanks in advance!!