I am trying to access Excel Custom Document Properties using Automation Controller.
I am using the 'Microsoft Excel 9.0 Object Library'.
To get to the CustomDocumentProperties Method I am using the Workbook Class.
Using the help file it says that you should use the following Syntax:-
CustomDocumentProperties.Item("Project")
So I create the variables as below:-
XLWorkbook - Automation - 'Microsoft Excel 9.0 Object Library'.Workbook
VariableA - Text - 1000
I then use the following code (bear in mind I have opened the Application etc...):-
VariableA := xlworkbook.CustomDocumentProperties.Item("Project");
I get a number of errors depending on how I change the syntax to try and get the result I want.
Has anyone got any ideas how to do this, or have they actually done it?
Regards
Tony
0
Comments
VariableA := FORMAT(xlworkbook.CustomDocumentProperties.Item("Project"));
By the way I noticed that you're declaring a text variable of length 1000. What's the limit on length with Attain?