An enum is a set of named constants mapped to integer values. It replaces obscure numeric arguments with readable names while preserving the values required by the underlying API. section 9.1.4
Use enums when automating APIs with predefined options:
- Pass a fully qualified Office enum value, such as WdAutoFitBehavior::wdAutoFitContent, to an API method. section 9.1.4
- Enumerate available values with GetEnumValues() instead of memorizing names or numeric assignments. section 9.1.4
- Prefer ValidateSet for simple PowerShell parameters; enumeration sets suit more advanced APIs or data integration. section 7.3.1
Table 9.1 WdAutoFitBehavior Enum (view table figure)
Compare the three WdAutoFitBehavior choices with their integer values and table-sizing behavior. section 9.1.4
Adding a Word table
A table can use wdWord9TableBehavior and wdAutoFitContent as named arguments, then receive cell text through the returned table object. section 9.1.4






















