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 2006

Tip: Looking for answers? Try searching our database.

Repeating Table Headers on Each Page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PolarBears - 08 Sep 2006 16:01 GMT
In Word 2003 (using Visual Basic), I am attempting to programmatically create
a table and fill the rows (which I have done successfully).  Now I want the
Table Header to repeat at the beginning of each page.

I have tried the statement:

     tbl.Rows(1).HeadingFormat = -1

I am wondering since my table is being created dynamically if that is an
issue.  Do I need to manually check for end of page?  If so, also how would
you go about that?  Thanks!
Jean-Guy Marcil - 08 Sep 2006 18:28 GMT
PolarBears was telling us:
PolarBears nous racontait que :

> In Word 2003 (using Visual Basic), I am attempting to
> programmatically create a table and fill the rows (which I have done
[quoted text clipped - 4 lines]
>
>      tbl.Rows(1).HeadingFormat = -1

Ok, and...?

> I am wondering since my table is being created dynamically if that is
> an issue.  Do I need to manually check for end of page?  If so, also

What issue?

> how would you go about that?  Thanks!

Why would you want to check for the end of the page?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

PolarBears - 08 Sep 2006 19:05 GMT
What kind of a response is that?!?  I simply am asking how to repeat the
table headers on each page in Visual Basic.  Previously, documentation had
indicated that the HeadingFormat set to -1 would cause this.  But it is not
working.  So I'm trying to figure out how.  If you don't have an answer,
don't reply!!

Danny

> PolarBears was telling us:
> PolarBears nous racontait que :
[quoted text clipped - 18 lines]
>
> Why would you want to check for the end of the page?
Jean-Guy Marcil - 08 Sep 2006 19:38 GMT
PolarBears was telling us:
PolarBears nous racontait que :

> What kind of a response is that?!?  I simply am asking how to repeat
> the table headers on each page in Visual Basic.  Previously,
> documentation had indicated that the HeadingFormat set to -1 would
> cause this.  But it is not working.  So I'm trying to figure out how.
> If you don't have an answer, don't reply!!

Wow... Please, take a step back!

I would love to help, this is why I asked questions. If I did not want to
help or answer, I would have ignored your post.
Please, read your original post as if you had not written it (and try to be
objective).

The only questions you had are:

   "Do I need to manually check for end of page?
       If so, also how would you go about that?"

You have to agree that it has nothing to do with
   tbl.Rows(1).HeadingFormat = -1
working or not.

You never stated that this particular line of code was not working.
You simply stated:

<quote>
I have tried the statement:

     tbl.Rows(1).HeadingFormat = -1

I am wondering since my table is being created dynamically if that is an
issue.
<end quote>

I did not see a question and asked about this issue you mentionned. I am
sorry if I was incapable of guessing that you were not getting the expected
results, especially since you did not state what you expected nor did you
describe the results you were getting. Very often in these groups people
have expectations that are beyond what the code that they are using can
produce. I am not saying this is your case, but, just to make sure, I did
try to make you write some more so that we do not waste our mutual time
trying to address an issue that is totally besides the point.

Finally, since I was not sure what the actual problem was, I asked at the
end:
   "Why would you want to check for the end of the page?"
because this is a common question (People want to know the available space
at the bottom of a page before inserting something on that page, I thought
this might be something you might have been concerned about, hence my
question.)

So, now, let's try to see what your problem is.

You stated that you created a table dynamically.
Then, you ran:
     tbl.Rows(1).HeadingFormat = -1
and you stated that it is not working.

The ".Rows(1).HeadingFormat = -1" part is definitely correct.

What do you mean by not working? Is the table that you created dynamically
spanning more than one page? What else does your code do to the table?
(Please, do not take this the wrong way, but in these groups, the statement
"It is not working." is one of the least useful in helping those that are
trying to understand the problem, and yet it is one of the most common.
Almost every single time, some will eventually ask "What do you mean by 'It
is not working.'?" It is much better to state the expectations and the
actual results.)

Also, what code did you use to dynamically create your table? In other
words, are you sure that "tbl" in the code you posted actually refers to the
table your code creates? Can you post that code?

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

Jezebel - 08 Sep 2006 23:37 GMT
> In Word 2003 (using Visual Basic), I am attempting to programmatically
> create
[quoted text clipped - 10 lines]
> would
> you go about that?  Thanks!
Jezebel - 08 Sep 2006 23:38 GMT
The answer's actually pretty obvious, but since you're so rude, you can work
it out for yourself.

> In Word 2003 (using Visual Basic), I am attempting to programmatically
> create
[quoted text clipped - 10 lines]
> would
> you go about that?  Thanks!

Rate this thread:






 
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.