Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word Automation - Word2002 vs. Word97
Message
De
06/11/2002 12:20:11
Patrick O'Neil
American Specialty Information Services
Roanoke, Indiana, États-Unis
 
 
À
05/11/2002 12:49:47
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00716139
Message ID:
00719392
Vues:
13
> 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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform