Copy link to clipboard
Copied
Sorry it is not working. It copies the table from start. I need only the remaining columns. If 7 columns is present in table. 3 is in first frame. 4 is within overset.I need remaining 4 only in nextframe.
By @Aysha27550661f9sm
Are you referring to my code?
Yes, in your code:
nextparentTextFram = myStory.TextContainers.item(-1).contents
you are copying visible part of the last TextContainer - which contains visible part of the Table - which is wrong.
My code isn't copying anything -
...Copy link to clipboard
Copied
You can't copy the overset part to a new frame.
Place a new frame and thread it to the overset frame: click the square with the small red cross (the so-called outport), then click on the new frame.
Copy link to clipboard
Copied
You can't copy the overset part to a new frame.
Place a new frame and thread it to the overset frame: click the square with the small red cross (the so-called outport), then click on the new frame.
By @Peter Kahrel
I'm pretty sure OP wants to split the cell between two pages...
Copy link to clipboard
Copied
You need to select text from the last "visible" InsertionPoint of the cell to the end of the parent text of the cell.
You need to create a new TextFrame and then use NextTextFrame property of the last TextContainer.
Something like that:
Set myNewTF = myNewPage.TextFrames.add
myNewTF.GeometricBounds = Array(0,0,100,100) ' you need to read PageBounds and substract margins
myStory.TextContainers.item(-1).NextTextFrame = myNewTF
Copy link to clipboard
Copied
Dim iTableCaptionFrame As InDesign.TextFrame = Nothing
iTableCaptionFrame = indesignDocument.TextFrames.Add(, InDesign.idLocationOptions.idAfter, parentTextFram)
iTableCaptionFrame.PlaceXML(iTGrpELm)
iTableCaptionFrame.GeometricBounds = New Object() {8, -30, -8 + tableElm.Height, tableElm.Width - 30}
iTableCaptionFrame.Fit(InDesign.idFitOptions.idFrameToContent)
indesignDocument.Selection = InDesign.idNothingEnum.idNothing
indesignDocument.Select(iTableCaptionFrame)
Dim parenOrigY1 = parentTextFram.GeometricBounds(0)
Dim parenOrigX1 = parentTextFram.GeometricBounds(1)
Dim parenOrigY2 = parentTextFram.GeometricBounds(2)
Dim parenOrigX2 = parentTextFram.GeometricBounds(3)
nextparentTextFram = parentTextFram.NextTextFrame
parentTextFram.Delete()
iTableCaptionFrame.Move(indesignApplication.ActiveDocument.Pages.Item(parentTextFramId + 2))
iTableCaptionFrame.RotationAngle = 90
If iTableCaptionFrame.Overflows = True Then
Dim myStory = iTableCaptionFrame.ParentStory
nextparentTextFram = myStory.TextContainers.item(-1).contents
nextparentTextFram.Move(indesignApplication.ActiveDocument.Pages.Item(parentTextFramId + 3))
nextparentTextFram.RotationAngle = 90
end if
i use this code. It is not working. I want to copy the overset into next frame. and use convert to header for header rows. Kindly help me
iTableCaptionFrame.GeometricBounds = New Object() {parenOrigY2, parenOrigX2, parenOrigY1, parenOrigX1}
Copy link to clipboard
Copied
This is all wrong:
Dim myStory = iTableCaptionFrame.ParentStory
nextparentTextFram = myStory.TextContainers.item(-1).contents
nextparentTextFram.Move(indesignApplication.ActiveDocument.Pages.Item(parentTextFramId + 3))
nextparentTextFram.RotationAngle = 90
You don't have to copy or move anything anywhere.
As per my earlier example:
Set myNewTF = myNewPage.TextFrames.add
myNewTF.GeometricBounds = Array(0,0,100,100) ' you need to read PageBounds and substract margins
myStory.TextContainers.item(-1).NextTextFrame = myNewTF
First, you need to create a new TextFrame - on some page - then connect it to the last TF of the Story you are working on.
Copy link to clipboard
Copied
Sorry it is not working. It copies the table from start. I need only the remaining columns. If 7 columns is present in table. 3 is in first frame. 4 is within overset.I need remaining 4 only in nextframe.
Copy link to clipboard
Copied
Sorry it is not working. It copies the table from start. I need only the remaining columns. If 7 columns is present in table. 3 is in first frame. 4 is within overset.I need remaining 4 only in nextframe.
By @Aysha27550661f9sm
Are you referring to my code?
Yes, in your code:
nextparentTextFram = myStory.TextContainers.item(-1).contents
you are copying visible part of the last TextContainer - which contains visible part of the Table - which is wrong.
My code isn't copying anything - it creates a new TextFrame and let's remaing Rows flow there.
You shouldn't use "columns" to describe what is "hidden"/overset - those are still "rows" of the Table - the fact that you've rotated your TextFrame 90 degrees doesn't change Rows to Columns - or vice versa - it only changes orientation and how you see it.
Try to do "it" in the InDesign manually - click on the "outport" (C) - red "+" - go to the next page (A) and either draw new TextFrame or just click anywhere on that page (B).
Those same steps you need to perform through scripting - but not in exactly same order:
(A) Set myNewTF = myNewPage.TextFrames.add
(B) myNewTF.GeometricBounds = Array(0,0,100,100) ' you need to read PageBounds and substract margins
(C) myStory.TextContainers.item(-1).NextTextFrame = myNewTF
Copy link to clipboard
Copied
s It is working. It helped me. Thank you for your support and patience towards me. Thanks a lot