Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Automation - Word2002 vs. Word97
Message
From
06/11/2002 12:20:11
Patrick O'Neil
American Specialty Information Services
Roanoke, Indiana, United States
 
 
To
05/11/2002 12:49:47
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00716139
Message ID:
00719392
Views:
12
> Well, let's suppose that is the case. Does anyone know the syntax
> for assigning a column width in a table in Word97 ?
>
> Also, I have looked high and low for the WORD9.CHM file (Word 97 VBA
> Help file) but am unable to locate any. Can anyone help me out with that?
>

don -

here is some code that does things you are asking about for Word97.
also, why are you looking for help files ? just look at the VB object
browser. it tells you everything about word objects.
(open word97. tools menu > macro > visual basic editor.
now you're in visual basic editor. view menu > object browser.
select "all libraries" to start with. everything you are after
hangs off Application object.)
...
  obj_Document.Tables.Add ( obj_Range , int_Feat_Count , 5 )   
  obj_Table = obj_Document.Tables(1)

  int_Column_Count = obj_Table.Columns.Count
  int_Row_Count    = obj_Table.Rows.Count

*  obj_Table.Rows.Height = 20
  
  int_Table_Width = 0  
  FOR int_Column_Index = 1 TO int_Column_Count
    int_Column_Width = obj_Table.Columns(int_Column_Index).Width
    int_Table_Width = int_Table_Width + int_Column_Width
    obj_Table.Columns(int_Column_Index).Cells.VerticalAlignment = 1
  ENDFOR
      
  obj_Table.Columns(5).Width = .050 * int_Table_Width
  obj_Table.Columns(4).Width = .050 * int_Table_Width
  obj_Table.Columns(3).Width = .050 * int_Table_Width
  obj_Table.Columns(2).Width = .800 * int_Table_Width
  obj_Table.Columns(1).Width = .075 * int_Table_Width
...
patrick
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform