Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formating two columns of output to MS Word
Message
From
29/09/1999 17:51:16
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00270766
Message ID:
00270778
Views:
24
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
Map
View

Click here to load this message in the networking platform