Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I want to create a dynamic Cycle group and set the Group as Cyclic .But I am not sure what I am missing in the below code.It throws me error at "gp.IsCyclic = true" .
Sub DymnamicGroup
ActiveDocument.RemoveGroup "Dimensions"
Set gr = ActiveDocument.CreateGroup("Dimensions")
gr.AddField "Age Range"
gr.AddField "Diagnosis Combo Desc"
gr.AddField "Diagnosis Desc"
set gp = ActiveDocument.GetGroup("Dimensions")
gp.IsCyclic = true
End Sub
Thanks
Priya
The below macro works.
Sub DymnamicGroup
ActiveDocument.RemoveGroup "Dimensions"
Set gr = ActiveDocument.CreateGroup("Dimensions")
gr.AddField "Age Range"
gr.AddField "Diagnosis Combo Desc"
gr.AddField "Diagnosis Desc"
gr.AddField "Payment Type"
set gp = ActiveDocument.GetGroup("Dimensions").GetProperties
gp.IsCyclic = true
ActiveDocument.GetGroup("Dimensions").SetProperties gp
ActiveDocument.GetApplication.Refresh
End Sub
Hi Priya,
I think what the macro u had written absolutely fine but i think the consition which u had given iscyclic =true i feel u would have given while creating the group itself, i am not sure check this one also
Sub DymnamicGroup
ActiveDocument.RemoveGroup "Dimensions"
Set gr = ActiveDocument.CreateGroup("Dimensions")
gr.AddField "Age Range"
gr.AddField "Diagnosis Combo Desc"
gr.AddField "Diagnosis Desc"
gr.IsCyclic = true
set gp = ActiveDocument.GetGroup("Dimensions")
Check like this ,meanwhile i will aslo try
Regards,
Ajay
End Sub
Thank you Ajay
I will try and will let you know if it works.
The below macro works.
Sub DymnamicGroup
ActiveDocument.RemoveGroup "Dimensions"
Set gr = ActiveDocument.CreateGroup("Dimensions")
gr.AddField "Age Range"
gr.AddField "Diagnosis Combo Desc"
gr.AddField "Diagnosis Desc"
gr.AddField "Payment Type"
set gp = ActiveDocument.GetGroup("Dimensions").GetProperties
gp.IsCyclic = true
ActiveDocument.GetGroup("Dimensions").SetProperties gp
ActiveDocument.GetApplication.Refresh
End Sub