General information
Category:
COM/DCOM and OLE Automation
Here's a snippet of code. I hope this is helpful.
oWord.ActiveDocument.Tables.Add( oWord.Selection.range, RECCOUNT() + 2, cColumnCount )
WITH oWord.Selection
.MoveRight( wdCharacter, cColumnCount , wdExtend)
.MoveDown( wdLine, RECCOUNT() + 2, wdExtend)
.Borders(wdBorderTop).LineStyle = wdLineStyleNone
.Borders(wdBorderLeft).LineStyle = wdLineStyleNone
.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
.Borders(wdBorderRight).LineStyle = wdLineStyleNone
.Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone
.Borders(wdBorderVertical).LineStyle = wdLineStyleNone
.MoveLeft( wdCharacter, 1)
ENDWITH
WITH oWord.Selection
.MoveRight( wdCharacter, cColumnCount, wdExtend)
.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
.MoveLeft( wdCharacter, 1)
ENDWITH
WITH oWord
.Selection.Tables(1).Columns(1).SetWidth(70, wdAdjustNone)
.Selection.Tables(1).Columns(2).SetWidth(30, wdAdjustNone)
.Selection.Tables(1).Columns(3).SetWidth(53, wdAdjustNone)
.Selection.Tables(1).Columns(4).SetWidth(53, wdAdjustNone)
.Selection.Tables(1).Columns(5).SetWidth(60, wdAdjustNone)
.Selection.Tables(1).Columns(6).SetWidth(214,wdAdjustNone)
.Selection.MoveRight( wdCell)
.Selection.MoveRight( wdCell)
.Selection.Font.Bold = wdToggle
= mpWriteDetail( '','AirDate', .T.)
.Selection.MoveRight( wdCell)
.Selection.Font.Bold = wdToggle
= mpWriteDetail( "",'Type', .T.)
.Selection.MoveRight( wdCell)
.Selection.Font.Bold = wdToggle
= mpWriteDetail( "",'Episode #', .T.)
.Selection.MoveRight( wdCell)
.Selection.Font.Bold = wdToggle
= mpWriteDetail( "",'Title', .T.)
.Selection.MoveRight( wdCell)
.Selection.MoveRight( wdCell)
.Selection.MoveRight( wdCell)
.Selection.MoveRight( wdCell)
.Selection.MoveRight( wdCell)
.Selection.MoveRight( wdCell)
.Selection.MoveRight( wdCell)
ENDWITH
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only