Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting columns in Word
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00623964
Message ID:
00624013
Views:
14
Hi James,

SetCount is a method not a property. Try
oword.activedocument.pagesetup.textcolumns.setcount(2)
There should be help file VBAWRD9.CHM (Word 2000) somewhere in the Office folder on your computer. It includes a Word object model.


>Hi All,
>
>I'm using Crystal Reports to write a report to Word and I want to format the Word document to have two columns.
>
>Here's the VB macro for doing this:
>
> With ActiveDocument.PageSetup.TextColumns
> .SetCount NumColumns:=2
> End With
>
>I've tried numerous variations to translate to VFP 6 with no luck and I can't seem to find the correct reference in the M.S. Automation w/VFP book.
>
>Any help, ideas would be appreciated.
>
>oword = createobject("word.application")
>oword.visible = .t.
>oword.documents.open(lc_word)
>oword.activedocument.pagesetup.textcolumns.setcount = 2 && error message
>
>TIA,
>
>Jim Harvey
>
>
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform