Possible bug:
When using MS Word automation in both VFP6 and VFP7 the style property for both the paragraphs object and the paragraphsformat object return an object not an integer as expected.
The following code should display two integers but instead it generates "operator/operand mismatch" errors.
loWord = CREATEOBJECT('word.application')
loDoc = loWord.Documents.Open(lcMyDocument)
?loDoc.Paragraphs(1).Style
?loDoc.Paragraphs(1).Format.Style
What the docs say about the style property:
___
EmailAuthor object: Returns a Style object that represents the style associated with the current e-mail author for unsent replies, forwards, or new e-mail messages. Read-only Variant.
All other objects: Returns or sets the style for the specified object. To set this property, specify either the local name of the style, an integer or a WdBuiltinStyle constant (see "Remarks"), or an object that represents the style. Read/write Variant.
___
Has anyone seen this? I could not find a KB article on it.
Rip Ryness
International Falls, MN