Table of contents
TOC
Collapse the table of content
Expand the table of content

Table.TableFields Property (Project)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Gets a TableFields collection representing the fields in the table. Read-only TableFields.

Syntax

expression. TableFields

expression A variable that represents a Table object.

Example

The following example changes the alignment of a column in an entry table. The macro asks for input from the user to indicate which column the user wants to center, then changes the display and refreshes the view.

Sub AutoWrap() 
 Dim fieldNumber As Integer 

 fieldNumber = InputBox$(Prompt:="Enter the number of the " _ 
 &; "column you want to center in the Entry table." _ 
 &; Chr(13) &; "For example, Column 1 is the Indicators " _ 
 &; "column.") 

 ActiveProject.TaskTables("Entry").TableFields(fieldNumber _ 
 + 1).AlignData = pjCenter 

 TableApply Name:="&;Entry" 
End Sub
© 2018 Microsoft