Repost: AutoFit Pivot Table columns

R

rusty cranbrook

I don't really understand the AutoFit property. I've found that

pt.ActiveView.FieldSets(3).Fields(0).DetailAutoFit = True

will make the columns autofit on a pivot table that has a filter
field, a row field, a column field, and a detail field. I'm not sure
why the index value of 3 works - how is the index populated? I mean
how do I know what index value to hit?

Also, when I set the TitleBar.Caption value, the columns AutoFit. Why
is this?

pt.ActiveView.TitleBar.Caption = "Sigh..."

An additional note - the AutoFit expression I posted that "works",
does not work after setting the XMLData property of the pivot table,
unless I do something else like initiate a progrmattic pause first.
How can this make sense?
 
A

Alvin Bruney

I'd like to suggest
1. Professional ASP programming guide for OWC, Zang
2. Programming MS office 2000 OWC, Stearns
as a resource for your problems.

Item 1 is an absolutely horrid book. Broken english all over the place.
Unclear examples, out of date material and faulty code galore. But it is the
best book out there because it is the only book out there. :)

Stearns is a feel good history about the OWC with an occasional example or
two. You might get lucky and find an example suited to your needs. I
seriously doubt it though. But it's not like you have much choice. You're
between a rock and a hard place.
 
R

rusty cranbrook

I can't find "Professional ASP programming guide for OWC" on either
bookpool or amazon. Is it about Office 2000, as the other book is? How
relevant would they be to either OWC 10 or 11? I had thought that so
much changed between 9 and 10 that these books wouldn't be worth
checking out.

Do you have any clue about the strange AutoFit behavior that I noted?
 
A

Alvin Bruney

here is a link to the book
http://tinyurl.com/268ae the cover states it is for 2000 and office xp. The
good thing is that though the architecture underneath has changed, the
objects are still largely backward compatible so that if you know OWC10 you
have a very strong grasp of OWC11. There've been some major changes from
OWC9 to OWC10 but it's not a steap learning curve either. I've used OWC9
know-how to figure out how to hack stuff in OWC10/11 so the knowledge
definitely helps. It's well worth it IMHO.

Autofit causes the pivot table to adjust itself when the view is changed
eliminating the need for scroll bars. This is the default behavior. So when
you change anything on the pivot table, it automatically readjusts itself.
I'm not sure here, but I believe that the index tells the autofit mechanism
to use this field as its base for adjustment. If this is causing you
problems, turn it off and use either the maxwidth or maxheight property.
This puts a cap on the adjustment of the pivot table.

sorry for the delay in response [blaming it on xbox and halo]
 
R

rusty cranbrook

Alvin, what is the ISBN for

Programming MS office 2000 OWC, Stearns

I was able to order the other one, but this one I cannot find a reference to.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top