Forcing bullet lists into styles (whether input or pasted)

D

downwitch

Like so many of the archived posts from this group, I'm sailing the
Word bullet list River Styx.

I am trying to tightly control formatting of a set of documents in MS
Word via templates and VBA. Users create new documents from the
templates, i.e. as "blank" documents; they also write/find documents
elsewhere and cut and paste into the templates. The output must not
change regardless of input method.

For fonts and such, there's no problem controlling this, and the users
understand enough to go along with it. But when it comes to bullet
lists...

I have followed Shauna's instructions to set up a proper list template
at http://www.shaunakelly.com/word/bullets/controlbullets.html. But as
she states in the page itself, the toolbar button should be avoided,
and Format > Bullets and Numbering... too. Problem is, users *don't*
avoid that toolbar button, and they are pasting text containing lists
out of other templates that don't have an elaborate list template
setup, so styles aren't matching up on paste.

I'm very comfortable in VBA (really an Access/Excel programmer, but oh
well); is there some event I can hook into to force all bullet-listing
into the styles, whether input or pasted, without disrupting the
user's expectations too traumatically?

Any/all suggestions welcome, many thanks in advance.
 
K

Klaus Linke

The basic idea is simple: You can intercept the built-in command (bullet toolbar button) with your own macro.

In the simplest case,

Sub FormatBulletDefault()
Selection.Style = ActiveDocument.Styles(wdStyleListBullet)
End Sub

You can improve on that, say, cycle through your bullet styles if the user clicks again, if you have several bullet styles.

The problem of users pasting bulleted and numbered paragraphs from other documents is a different issue.
You might offer a macro that converts any bulleted paragraph into your preferred bullet style.

But basically, users will have to apply proper styles after they paste something anyway, and it's questionable if it's worth the trouble to invest a lot of work into complex macros, and then the users blame you every time something doesn't work as they expect... ;-)

Word 2007 has more elaborate options for pasting... You might consider setting these in a way that pasted text from other documents and other programs (browser...) is always pasted as plain text, so it's obvious to users that they have to apply your styles.

Klaus
 

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