Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a table in Word
Message
 
 
À
13/06/2001 19:42:02
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00519108
Message ID:
00519158
Vues:
17
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform