问题
I'm struggling to save the current value of an object (at least I think it's an object) in MS Project VBA.
Here's what I'm trying to do, save the value of my current header text.
dim a As String (or Variant/Object?)
a = Application.FilePageSetupHeader.Text.Value
This obviously doesn't work, but gets the point across. The syntax for this is:
expression. FilePageSetupHeader( ** Name, ** Alignment, ** Text** )
with Name and Text being passed as a string.
If I get this to work, I'll also be interested in extracting the NormalType
value from this object. Notice I'll have to specify the item:
GridlinesEditEx Item:=4, NormalType:=1
Any help would be appreciated!
回答1:
FilePageSetupHeader
is a method of the application object, not a property (see MSDN). The MS Project object model does not have a header object to interrogate, so unfortunately the headers (and footers) are write-only.
来源:https://stackoverflow.com/questions/48721287/read-get-the-current-value-of-an-object-in-project-vba