Hi,
Add one more %, that will prevent the expansion of string register, such as %%H. For the simple testing case, you can try the following script. Note, this simple script cannot handle the case in which there are more than one % in the string.
StringArray saTest;
// Loop over every workbook in project
doc -e W {
// Create string as link whose display is current page.longname$
string strLink$ = "range://[%(page.name$)] %(page.longname$)";
// if there is %, note that the long name may be much more
// complicated, and need much more codes to handle
int ii = strLink.Find('%');
if(ii != 0)
strLink.Insert(ii, "%"); // insert one more %
// Add to string array
saTest.Add(strLink$);
}
// Create a basic workbook
newbook;
// Assign string array to column 1
range rngCol1 = col(1);
saTest.CopyTo(rngCol1);
Penn