Page 1 of 1

[C#/CLI] Accessing Cross Reference values

Posted: Tue Jul 17, 2012 6:39 pm
by paulr00001
I'm using the AOO 3.4.0 CLI dlls & Visual Studio, and I'm trying to access the values of some cross references set in a document.

I can get their names, but still can't get to the values.

Code: Select all

XReferenceMarksSupplier xRefSupplier = (XReferenceMarksSupplier)xComponent;
XNameAccess xMarks = (XNameAccess)xRefSupplier.getReferenceMarks();
string[] aNames = xMarks.getElementNames(); 
Could someone please share an example of retrieving the value of the reference marks?
Am I getting close by using getByName ?

Code: Select all

for (int i = 0; i < aNames.Length; i++)
{
  var refrval = xMarks.getByName(aNames[i]);
 }