Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I've been using some vb code similar to below to cycle through my cycle group, however after adding an expression it now blows up on the GetActvieField.Name.
Does anyone know a suggested work around?
sub set_group_field
set gp = ActiveDocument.GetGroup("GroupName")
do while gp.GetActiveField.Name <> "FieldName"
gp.Cycle 1
loop
end sub
Ok,
I tried different macros...
this expression should work for you:
do while activedocument.evaluate("=GetCurrentField([GroupName])") <> "FIELDNAME"
You can check the possible results with:
msgbox ( activedocument.evaluate("=GetCurrentField([GroupName])"))
The only difference will be that for a calculated dimension, the currentfield will return the whole expression...
Hope this helps this time
Regards,
Erich
I guess it`s returning the expression definition instead of the name you gave to it.
You can use some msgbox( gp.GetActiveField.Name) to check what is going on...
I suggest you create another field on the script if it is possible
Hope this helps,
Erich
Erich - I tired that but unfortunately the error is being thrown on the gp.Activefield.Name reference.
Ok,
I tried different macros...
this expression should work for you:
do while activedocument.evaluate("=GetCurrentField([GroupName])") <> "FIELDNAME"
You can check the possible results with:
msgbox ( activedocument.evaluate("=GetCurrentField([GroupName])"))
The only difference will be that for a calculated dimension, the currentfield will return the whole expression...
Hope this helps this time
Regards,
Erich
That worked perfectly, thanks so much.