Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
List all styles and their properties of a Word document
Message
 
 
To
15/08/2007 06:35:56
Hans-Otto Lochmann
Dr. Lochmann Consulting Gmbh
Frankfurt, Germany
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01248197
Message ID:
01248499
Views:
19
Maybe I'm missing something but you can use Styles collectuion to loop throug all the styles and retrieve their properties.Something like
oDoc = oWord.ActiveDocument
FOR EACH oStyle IN oDoc.Styles
	IF NOT oStyle.Builtin
		? oStyle.NameLocal
		? oStyle.Font.Name, oStyle.Font.Size
                ...
	ENDIF
ENDFOR
>
>I have a lengthy Word document, which has about 350 pages and about 190 different styles. I assume, that quite a few of the styles are at least very similar if not identical (besides their different names).
>
>Did anybody ever write some code, most preferably in VFP, which lists not only all styles by their name (that's easy), but also the values of all properties of all styles, preferably into an Excel sheet?
>
>Any idea is welcome!
>
>Hans
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform