Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a table in Word
Message
 
 
To
13/06/2001 19:42:02
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00519108
Message ID:
00519158
Views:
16
>>More info. The following creates the table correctly, but again, I cannot access an cell information.
>>#define CHR_TAB	chr(9)
>>#define CHR_CR	chr(13)
>>local loWord, loDoc, lcString
>>loWord   = newobject('word.application')
>>loDoc    = loWord.Documents.Add()
>>lcString = "Parameters" + CHR_TAB + "Limit" + CHR_TAB + "Average" + CHR_CR ;
>>	 + "Chlorine"   + CHR_TAB + "13.5"  + CHR_TAB + "10"      + CHR_CR ;
>>	 + "Boron"      + CHR_TAB + "55.8"  + CHR_TAB + "45"
>>loWord.Visible = .t.
>>loRange = loDoc.Range()
>>luWhat  = loRange.InsertAfter(lcString)  && works but returns empty string
>>loTable = loRange.ConvertToTable(1, , , , 23)  && create a 3 row x 3 col table
>>? loTable.Cell(1,1).Value  && error
>>suspend
>>
>
>Mark,
>I can't check or test now but I think it would be :
>loTable.Rows(1).Cells(1).Range.Text
>Cetin

Beautiful! One problem solved. But why is the table screwed up? It creates it as a 1 row x 7 Column table instead of a 3 x 3.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform