Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to pass the Object ID as a parmater within an expression
E.g. Window Title:
= "This object's ID is" & ObjectID
would display
This object's ID is CH56
I'm thinking of using this in conjunction with an EVAL statement to retreive expressions from a database based on the Object ID.
You can certainly do this using macros. You can run a macro on-open which will initialize some veriables. These variables then you can use in your expressions:
set s = ActiveDocument.Sheets("Main")
set so = s.SheetObjects(0)
set v = ActiveDocument.Variables("myObjectID")
v.SetContent so.GetObjectId, true
May be I am not understanding what exactely you are trying to achieve. Hope this help you with what you need.
Hi,
The function GetObjectID is available if you use a macro.
This is an exttract from the API guide.
rem ** get unique object ID for first object on sheet Main **
set s = ActiveDocument.Sheets("Main")
set so = s.SheetObjects(0)
id = so.GetObjectId
msgbox("ID = " & id)
Regards, Annette
So, I have a number of elements on a page, and I am trying to automate the generation of their expressions.
In particular I plan to store the expression for each object in a database, and load this database in.
I would then like to retrieve the expression for a particular object based on the object ID.
Essentially I would like to have =MaxString(If (objectID=this.object.ID,eval(expression))))