Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Increase/Decrease Size of Text Box with Macro

Hello,

I am trying to define the size of a text box by multiplying the width and length by the value stored inside a variable. I have the following but I get an error.

sub Resize

set obj = ActiveDocument.GetSheetObject("TX26")

  set v = ActiveDocument.Variables("vCubeSize")

  v.SetContent vSize, true

set Width = ActiveDocument.fields("ITEM_CASE_WIDTH").GetPossibleValues

set Height = ActiveDocument.fields("ITEM_CASE_HEIGHT")GetPossibleValues

    set fr = obj.GetFrameDef

    set pos = fr.Rect

    pos.Width = pos.v

    pos.Height = pos.v

    obj.SetFrame fr,true,dummy

      End sub

Any help would be greatly appreciated.

Thanks

1 Reply
m_woolf
Master II
Master II

You're missing a period in the set Height line.

Have you stepped through the code to locate the error?