Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to enable 'Repeat Header Rows' in a Word Table from VBA?

Posted on 2004-04-07
2
Medium Priority
?
2,197 Views
Last Modified: 2012-05-04
I have created a Word Table in Word 2000 and want to enable the 'Repeat Header Rows' feature forthe table on each new page from VBA. So far, I havent been able to find the VBA call to do this?

Help?

0
Comment
Question by:JohnELewis
2 Comments
 
LVL 26

Accepted Solution

by:
EDDYKT earned 1000 total points
ID: 10777619
How about

dim wd

set wd = wscript.createobject("word.application")
wd.Application.Visible = True

wd.Documents.Open "c:\\temp\\Doc1.doc"
wd.ActiveDocument.Tables(1).Rows(1).Select
wd.Selection.Rows.HeadingFormat = True
wd.ActiveDocument.Save
wd.ActiveWindow.Close
wd.quit
set wd = nothing
0
 

Author Comment

by:JohnELewis
ID: 10781891
Thank you.

Worked a treat!

John
0

Featured Post

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.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

963 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