bullet definition changes from W2000 to W2002

V

Vivian Carroll

Hi,

I'm repeating below a message that I posted a few days ago in the vba
newsgroup but got no response.

I created a template in W2000 that is used as an Add-in. It displays a
toolbar that has a choice for "Create Doc". When the Create Doc button is
clicked, a macro runs that 1) creates a new document from Normal.dot, 2)
inserts AutoText containing the procedure format, and 3) copies all of the
styles from the add-in template into the document. This works fine in W2000.
(The client did not want to access the template via File|New.)

When I use the same add-in template in W2002, the Create Doc macro works
fine for everything except the bullet styles. They get modified within the
template itself (i.e., when I open the template in W2002, the styles now
have different tab locations). They get modified again when the macro runs
that copies the styles from the template to the document -- the bullet part
of the style definition gets stripped out. As a work-around, I added to the
macro to re-define the bullet styles after copying them into the document.

My question is why is W2002 changing the bullet style definitions and what
is a better way to fix the problem?

TIA,
Vivian Carroll
 
S

Suzanne S. Barnhill

The best way to fix the problem, in my opinion, is to teach the client to
use File | New. It's absurd to write a bunch of macros to do what you can do
with one stroke by creating a document based on a template.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
V

Vivian Carroll

Well, thanks for the candid answer, Suzanne! Since I thoroughly trust your
Word knowledge, I assume that this answer means that there is not a
generally-known problem with bullet definitions changing between W2000 and
W2002.

The reason the client wouldn't use the template from File, New is that they
are a large medical company with very strict controls over their documents
(including templates) and access them from a file management system. I don't
recall the specific problems using File | New (they didn't let me test -
they did it and told me to set it up as a global template). It was very
difficult just to convince their IT department to allow macros to enter the
company by any method!

Vivian
 
S

Suzanne S. Barnhill

I guess you're pretty well stuck, then, and since I'm VBA-less, I can't help
with the macro problem, but perhaps someone else can. If you don't get an
answer here, try one of the Word VBA NGs. One issue, of course, is that if
you apply bullets directly through Bullets and Numbering rather than by
applying a style, you get whatever happens to be in a given position in the
List Gallery at the time. Since you're using styles, however, that should
not be an issue, though it would probably help, if you have not already done
so, to set up the bulleted styles as part (just one level) of an
outline-numbered list so that you can link the style to the numbering and
name the list template.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://www.mvps.org/word
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
S

Shauna Kelly

Hi Vivian

Here are four possible things to try:

First, in Word 2002, the Customize Outline Numbered List dialog and the
Customize Numbered List dialog acquired a new setting. Word 2000 only
had two settings for nominating positions and indents; Word 2002 has
three. In fact the settings have always been there in VBA; but the UI
only allowed them to be set separately from Word 2002. So there might be
a problem here. There are pictures of the two, and an explanation of
what they do at http://www.ShaunaKelly.com/word/concepts/bullets/ in
the section "Modifying indents for bullets".

In VBA, you can get to these through:
ActiveDocument.ListTemplates(1).ListLevels(1).NumberPosition
ActiveDocument.ListTemplates(1).ListLevels(1).TabPosition
ActiveDocument.ListTemplates(1).ListLevels(1).TextPosition

Make sure that all three are set explicitly and appropriately. Don't
give Word a wrong value for .TextPosition; if you do, it will "guess",
and "guessing" probably isn't what you want here.

Second, make sure that the default tabs for the normal style for the
documents are set appropriately. This can affect how bullets and
numbering are laid out.

Third, experiment with different settings for the Tools > Options >
Compatibility > "Don't add automatic tab stop for hanging indent". Note
that this setting os *document-specific*. In the normal course of
events, a user chooses File > New and the document will inherit this
setting from its parent template. Since you're not creating a document
in the usual way, you may have to set it in VBA for each document you
create.

Fourth, bear in mind the advice at
http://www.mvps.org/word/FAQs/MacrosVBA/UpdateStyles.htm, particularly
the issue at section 3 near the end of that page. I, too, have
experienced circumstances where running the code 3 times sets the
bullets firmly, but once or twice isn't enough.

FWIW, if I were doing this, I would definitely re-set the style
definitions in code when the new document is created. And, I'd do that
for all numbered or bulleted styles. And, I'd run the code 2 or 3 times.

Lastly, make sure you've read
http://www.mvps.org/word/FAQs/Numbering/WordsNumberingExplained.htm.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
Melbourne, Australia
 

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