Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AutoFormat a grid in Word
Message
From
19/12/1999 07:23:07
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
AutoFormat a grid in Word
Miscellaneous
Thread ID:
00305847
Message ID:
00305847
Views:
65
I am having problems automating a Word grid. This may be basic stuff for you guys but I am fairly new to this and I can't seem to sort it out. Does anybody have any ideas? Thanks in advance. Greg

Here is my code ;

#DEFINE True .T.
#DEFINE False .F.

&& Populates the grid
WITH loTable
FOR lnRow = 1 TO ALEN(laTableData, 1)
FOR lnColumn = 1 TO ALEN(laTableData, 2)
.Cell(lnRow,lnColumn).Range.InsertAfter(laTableData[lnRow,lnColumn])
ENDFOR
ENDFOR

.AutoFormat ;
(wdTableFormatGrid6, ;
True, ;
True, ;
True, ;
True, ;
True, ;
False, ;
True, ;
False, ;
True)
ENDWITH

&& ERROR; 'variable wdTableFormatGrid6 is not found'

=============================
I have also tried:

.AutoFormat ;
Format:=wdTableFormatGrid6, ;
ApplyBorders:= True, ;
ApplyShading:=True, ;
ApplyFont:=True, ;
ApplyColor:=True, ;
ApplyHeadingRows:=True, ;
ApplyLastRow:=False, ;
ApplyFirstColumn:=True,;
ApplyLastColumn:=False, ;
AutoFit:=True

&& I get a Syntax error.
Next
Reply
Map
View

Click here to load this message in the networking platform