Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can you convert following set of macro code to an action ? I run the macron on a field event trigger ON EDIT '%_Field1'
sub ActiveSelectionChart
set ss1 = ActiveDocument.ActiveSheet
if ss1.GetProperties.Name = "Ref" then
set vAlignSelected = ActiveDocument.fields("%_Field1").GetSelectedValues
select case vAlignSelected.Item(0).Number
case 1 ' Clear Sales Force
set IB = ActiveDocument.GetSheetObject("TB68")
if IB.IsMinimized =False then
IB.Minimize
set LB = ActiveDocument.GetSheetObject("TB65")
LB.Restore
end if
case 2 ' Clear Political Geography
set HB = ActiveDocument.GetSheetObject("TB65")
if HB.IsMinimized = False then
HB.Minimize
set CB = ActiveDocument.GetSheetObject("TB68")
CB.Restore
end if
end select
end if
end sub
I'm pretty sure the answer is, "you can't". Actions are not this sophisticated.