Word Automation - determining if style exists

Author: Andrew Dewey

Posted: 2001-05-14 at 12:42:59

I'm trying to use amembers() to test for the existence of a custom style.

I try:

nstyles = amembers(aStyles,oDoc.Styles)

and I get a result of 0. Will amembers work with non-fox objects, and if

so, what am I doing wrong.

Many Thanks,

Andrew

PS

This is the code I use to add the style:

oBodyStyle = oDoc.Styles.ADD( "Body", 1 )

Andrew Dewey

Acadia Computer Corp. Bar Harbor, ME

andrew@acadiacomp.com

©2001 Andrew Dewey