Skip to main content
July 24, 2015
Question

move table within a textframe?

  • July 24, 2015
  • 1 reply
  • 1356 views

Hii

Can anyone please tell me how can I move a table within a textframe?

Is it possible to do so using vb.net?

Please please help

Thanks

This topic has been closed for replies.

1 reply

Jump_Over
Legend
July 24, 2015

Hi,

It supposes to go similar like moving text.

How to find text which handles a table? Take character covered by insertionPoints before and after table.

Example:

// that is javascript so for vbs use the logic rather

// assumed that cursor is placed within table's parentStory and it is a new destination.

// it takes 1st table found in the story

var

  mStory = app.selection[0].parentStory,

  start = mStory.tables[0].storyOffset,

  tableHandler = mStory.insertionPoints.itemByRange(start, mStory.insertionPoints.nextItem(start)).characters[0],

  target = app.selection[0].insertionPoints[0],

  targetBase = mStory.insertionPoints.itemByRange(target, mStory.insertionPoints.nextItem(target)).characters[0];

  tableHandler.move(LocationOptions.BEFORE, targetBase);

Jarek

July 24, 2015

Hi

Thanks for replying.

I will try your code through vb and let me how it works out?

Thanks