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 / September 2005

Tip: Looking for answers? Try searching our database.

Repeat Header problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
S Shulman - 26 Sep 2005 15:34 GMT
Hi

I encounter the following problem:

After inserting a table to the document I add the following lines:
obTable.Rows.HeadingFormat = True
obTable.Rows.AllowBreakAcrossPages = False
and the table heading is not repeated, however when I record this design to
a macro the come seems identical but that table does repeat the heading

Thank you,
Shmuel Shulman
Jay Freedman - 26 Sep 2005 18:38 GMT
> Hi
>
[quoted text clipped - 9 lines]
> Thank you,
> Shmuel Shulman

Hi Shmuel,

Apply the HeadingFormat setting to one specific row at a time, not to the
entire Rows collection.

  obTable.Rows(1).HeadingFormat = True

and if you want two rows to repeat, also include

  obTable.Rows(2).HeadingFormat = True

The recorded code is a bad example. What I get is

  Selection.Rows.HeadingFormat = wdToggle

which applies the HeadingFormat to whatever rows happen to be selected at
the time. Since you've removed the Selection reference and replaced it with
obTable, the reference is to all the rows in the table.

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

S Shulman - 26 Sep 2005 19:46 GMT
Thanks for you response,

I tried that but still doesn't work

Shmuel

>> Hi
>>
[quoted text clipped - 29 lines]
> with
> obTable, the reference is to all the rows in the table.
Jay Freedman - 26 Sep 2005 20:06 GMT
Could you please post the complete code?

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

> Thanks for you response,
>
[quoted text clipped - 40 lines]
>> Jay Freedman
>> Microsoft Word MVP          FAQ: http://word.mvps.org
S Shulman - 27 Sep 2005 13:43 GMT
I was prparing the code to send you and it is working looking into it...

Thank you,
Shmuel

> Could you please post the complete code?
>
[quoted text clipped - 42 lines]
>>> Jay Freedman
>>> Microsoft Word MVP          FAQ: http://word.mvps.org
 
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.