2014-01-06, 06:10 #1
- Join Date
- May 2006
- Currently in Europe
- Thanked 0 Times in 0 Posts
Macro to determine paragraph formatting
I’m writing a macro in Word 2010 that will scan documents and apply custom styles to paragraphs that have direct formatting. This is partly for legacy documents (pre Word 2007) and partly for documents created by Confluence’s «export to Word» feature.
I am confused by the difference between .ListFormat.ListLevelNumber and .ListFormat.ListType. Actually, I'm just confused by how Word defines lists; using the "reveal formatting" feature on documents created by Word versions earlier than 2007 gives different results on lists that look alike. It seems to me like there is more than one way for Word to define a list.
Is there a simple way to determine if a paragraph is a bulleted, numeric or alphabetic list?
I would like to avoid testing for the various enumerations of WdListType. There are many of these types, most of which I can’t figure out and can’t find information about. (E.g. «GB numeric 1 style” or “Arabic LZ4 numeric style”)
I’m grateful for any code examples or reference to information.
Edit for clarity.Stylus
Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!
+ Get this BONUS — free!
Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!