Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I know the process of assigning caption text to container through macro is by creating a variable, assign the caption's text to this variable and then set variable value inside the macro, but this will only be applicable for existing container.
I have created my container through the macro, so I need to first assign the variable to the caption's text, but I don't know how to do this.
Any ideas?
Thanks,
Jyotsna
Hi,
Try this
Set ContainerObj = ActiveDocument.Sheets("Main").CreateContainer
set ContProp=ContainerObj.GetProperties
set v = ActiveDocument.Variables("vVariable")
v.SetContent "Sales",true
end sub
Reference:
Regards,
Jagan.
This is ok but how will the container's caption link to variable.
Thanks,
Jyotsna
You need to call the variable in the caption i think.
I need to do this from inside macro as the container is created using a macro.
Please let me know how to do this.
Thanks,
Jyotsna