?
Solved

table in word (vb.net ) repeat the header

Posted on 2006-05-04
9
Medium Priority
?
1,058 Views
Last Modified: 2011-10-03
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
0
Comment
Question by:mte01
  • 5
  • 3
9 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16604833
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:

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

Bob
0
 
LVL 3

Author Comment

by:mte01
ID: 16604978
>>TheLearnedOne

I'll be waiting for comments from other experts....
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 600 total points
ID: 16605060
I love being wrong ;)

I found the Table option for Heading Rows Repeat, recorded a macro, and it came up with this:

   Selection.Rows.HeadingFormat = wdToggle

Bob
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 3

Author Comment

by:mte01
ID: 16605175
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
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16605259
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
0
 
LVL 3

Author Comment

by:mte01
ID: 16605302
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
0
 
LVL 12

Accepted Solution

by:
omegaomega earned 1400 total points
ID: 16606430
Hello, mte01,

What happens if you try:

    oTable.Rows(1).HeadingFormat = True

Cheers,
Randy
0
 
LVL 3

Author Comment

by:mte01
ID: 16606590
it worked
thanks
0
 
LVL 3

Author Comment

by:mte01
ID: 16647123
>>omegaomega

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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question