I have a Word document
oWord:=CREATEOBJECT("Word.Application")
oWord:Documents:Add()
oRange:=oWord:ActiveDocument:Range()
and I insert a small table
oTable_Cliente:=oWord:ActiveDocument:Add(oRange,1,1)
WITH OBJECT oTable_Cliente
:Cells[1]:InsertAfter( Trim("cliente:" ) )
:Cells[1]:InsertAfter( CR )
:Cells[1]:InsertAfter( "INDIRIZZO" )
:Autofit()
END
oWord:Visible := .t.
Return nil
and I wish move this table on the Right of the document , howI must make to show it ?
the test.prg
oWord:=CREATEOBJECT("Word.Application")
oWord:Documents:Add()
oRange:=oWord:ActiveDocument:Range()
and I insert a small table
oTable_Cliente:=oWord:ActiveDocument:Add(oRange,1,1)
WITH OBJECT oTable_Cliente
:Cells[1]:InsertAfter( Trim("cliente:" ) )
:Cells[1]:InsertAfter( CR )
:Cells[1]:InsertAfter( "INDIRIZZO" )
:Autofit()
END
oWord:Visible := .t.
Return nil
and I wish move this table on the Right of the document , howI must make to show it ?
the test.prg
#Include "FiveWin.ch"
#DEFINE wdAlignParagraphLeft   0
#DEFINE wdAlignParagraphCentre  1
#DEFINE wdAlignParagraphRight  2
#DEFINE wdCollapseEnd      0
#DEFINE wdStory            6
#DEFINE wdBorderTop       -1
#DEFINE wdLineStyleDouble    7
#DEFINE CR Â Â Â Â Â Â Â Â Â Â CHR(13)
Function Main()
Local oTable_Cliente
Local oWord,oRange,nRecCount,nRow,nTotSalary:=0
oWord:=CREATEOBJECT("Word.Application")
oWord:Documents:Add()
WITH OBJECT Â oTable_Cliente
         :Cell(1,1):Range:ParagraphFormat:Alignment:=wdAlignParagraphRight
       :Cells[1]:Range:InsertAfter( Trim("cliente:" ) )
       :Cells[1]:Range:InsertAfter( CR  )
       :Cells[1]:Range:InsertAfter( "INDIRIZZO" )
        :Columns:Autofit()
     END
oWord:Visible := .t.
Return nilSince from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com


