Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Position in columns
Message
 
À
10/12/2004 20:27:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00968474
Message ID:
00968476
Vues:
8
This message has been marked as the solution to the initial question of the thread.
Hi Carlos,

Using MS Word Automation create a table with 4 columns and then assign each cell your column values.
Something Like THIS....

Selec cscommout
Public oMyWordObj
oMyWordObj = CREATEOBJECT('Word.Basic')
oMyWordObj.TableInsertTable("","2","3")  &&,"Auto","0","167")
oMyWordObj.BorderOutside(1)
oMyWordObj.BorderInside(1)
oMyWordObj.InsertPara
oMyWordObj.Insert("To: ")
oMyWordObj.BOLD
oMyWordObj.InsertFormField("","","Text1",1,0,"0","")
oMyWordObj.SetFormResult('Text1',  ALLTRIM(THISFORM.TITLEtxtBOX1.VALUE))
oMyWordObj.NextCell
oMyWordObj.BorderOutside(1)
oMyWordObj.BorderInside(1)
oMyWordObj.InsertPara
oMyWordObj.Insert ("Attention: ")
oMyWordObj.BOLD
oMyWordObj.InsertFormField("","","Text1",1,0,"0","")
oMyWordObj.SetFormResult('Text1',  ALLTRIM(cscommout.ATTN))
oMyWordObj.NextCell
oMyWordObj.BorderOutside(1)
oMyWordObj.BorderInside(1)
oMyWordObj.InsertPara
oMyWordObj.Insert ("From: ")
oMyWordObj.BOLD
oMyWordObj.InsertFormField("","","Text1",1,0,"0","")
oMyWordObj.SetFormResult('Text1',  ALLTRIM(cscommout.FROM))
oMyWordObj.NextCell
oMyWordObj.BorderOutside(1)
oMyWordObj.BorderInside(1)

Like Wise.... You have to make a table of 4 and start assigning cell by cell
>Hi everyone. I had a little problem. I have created a table that sends data to a word document in 4 colums, but it shows colums in different position in word. The question is: How do I print the columns aligned in the same column in order to see it aligned (col, row...).
>
>In word I see it like this:
>
>column-1 column-2 column-3 column-4
>
>SALDARRIAGA VASCONEZ CRISTOBAL COLON 0005025604 CTE 215.08
>SANCHEZ MACHADO GREGORIO LENIN 0001078611 AHO 35.71
>SANTILLAN VERA GEOCONDA NARCISA 0001074047 AHO 43.32
>SANTOS QUIMI FREDDY GIOVER 0001219527 AHO 132.16
>STEPAN AGUIRRE DIETER WOLFANG 005027086 CTE 75.31
>SUAREZ GOMEZ ARMANDO RIGOBERTO 0001083887 AHO 59.41
>SUAREZ TAMAYO ALEX RICARDO 0001255293 AHO 68.71
>
>How can I align this?
>
>Thanks in advance...
>
>Any example code will be appreciated.
>Carlos Burgos
--
--
Aashish Sharma
Tele Nos: +1-201-490-5405
Mobile: +91-9821053938
E-Mail:
aashish@aashishsharma.com
write2aashish@gmail.com

You better believe in yourself... if you don't, who else will ?
TODAY is a gift, that's why it's called PRESENT
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform