PDA

View Full Version : Solved: 32 linked text box limitation



MacroShadow
08-16-2012, 01:02 PM
Hello All,

Does anybody know of a workaround for the 32 linked text-box per story limitation?

fumei
08-17-2012, 02:31 PM
This is a built-in limitation in Word. I know of no such workaround but then I have never found a real use for linked text boxes. I am curious about your need for +32. Could you explain?

Speaking of limitations...

Maximum number of bookmarks = 2,147,483,647 (Word 2010)

Can anyone imagine EVER needing 2 BILLION bookmarks?????? Say you had a 1,000 page document, that would be 2,000,000 per page. Even if you had every single character bookmarked, you could not use them all.

gmaxey
08-17-2012, 08:46 PM
I wonder how long it would take:

Sub ScratchMacro()
Dim i As Long, oRng As Range
For i = 1 To 2147483647
ActiveDocument.Range.InsertAfter "X"
Set oRng = ActiveDocument.Characters.Last.Previous
ActiveDocument.Bookmarks.Add "X_" & i, oRng
Next i
End Sub

fumei
08-17-2012, 10:00 PM
LOL. I dare you to actually execute that...or HAVE you? Was that a rhetorical question?

fumei
08-17-2012, 11:07 PM
OK, I am willing to guess that you did NOT execute that...as some building up to it on my machine comes up with a rough estimate of it taking 100 days.

I suspect that memory issues would come into play. What do you think?

gmaxey
08-18-2012, 05:24 AM
Gerry,

I did execute it and after a few (maybe 15) seconds, I interupted the execution. It had filled 6 (I think) pages and i was up to around 28K. I didn't use scientific methods but concluded rather quickly that it would take longer than I cared to wait ;-)

As for memory, I don't know. Remember, I'm only a dabbler and really don't know anything about computers.

MacroShadow
08-18-2012, 02:09 PM
I could explain but you're not going to like it....

I'm trying to use linked text boxes instead of footnotes, so I can format them in two columns.

fumei
08-18-2012, 04:10 PM
ooooooooo, you are right. I don't, but hey it is your work. In any case, I believe you are stuck. There is a max of 32 linked textboxes, and I doubt there is a workaround. Not 100% sure of course. It could be there is not one because no one has seriously tried to make a workaround. Still, I do not think there is one. I have to admire your innovative approach but I think you are SOL with this one.

Greg, I made it to about 20,000 iterations, and while it is very possible that there would be deviations to the processing, I used the time involved to extrapolate how long it would take to do 105,000 more of the same iterations chunk (20 000 * 105 000 = 2 100 000 000).

About 2,500 hours or +100 days. As for the memory issue, every single iteration means addng a bookmark to the bookmark collection. And THAT means a write operation to the temp file Word holds together waiting for a Save operation. Even if you did an explicit Save during the processing (after every 1000 iterations say?), that may even make things worse. Hard to say. I just find it difficult to think Word is robust enough to handle 2 BILLION continuous write operations to the same file over 100 days. It still has, AFAIK, problems with corruption and most of that comes from write operations.

I, for one, am not going to try it to see. Maybe if I was still working. We had labs for messing around in. If I could not get official permission to dedicate a machine, I am pretty sure I could have got unofficial. This is something the serious geeks would have been curious about. My money would be on betting Word would choke.

macropod
08-19-2012, 09:40 PM
I could explain but you're not going to like it....

I'm trying to use linked text boxes instead of footnotes, so I can format them in two columns.
The simple solution, which you probably won't like, is to use a two-column page layout for the text. That way, the footnotes will also have a two-column layout.

fumei
08-19-2012, 10:38 PM
ooooooooo

macropod
08-19-2012, 10:48 PM
Can you do that backwards through a straw while changing a light bulb?

MacroShadow
08-20-2012, 04:04 AM
Thanks Paul but I was looking to enable footnote formatting in two columns regardless of the main story layout.

Actually I think what would work as a partial solution, is to automatically split the document when the count of 32 linked text boxes is reached, and merge all documents when completed.
There are a lot of potential problems that probably will arise, that will need addressing to, but as an idea it's a start.

Frosty
08-20-2012, 09:51 AM
You can merge two documents with 32 linked text boxes each into a single document and not run into your limit?

Perhaps not all of the text boxes need to be linked? What about adding a function to create the linked text box only when needed, and don't use linked textboxes otherwise?

It seems like it would be easier to do your own custom linking than to set up a scenario where you need to merge documents when the layout is clearly so important (that's generally the first stuff that gets wonky when you merge to documents).

MacroShadow
08-20-2012, 09:59 AM
You can merge two documents with 32 linked text boxes each into a single document and not run into your limit?
What I meant is that each document will contain linked text boxes that will end at the limit, in the merged document no more linking will be done.

As far as you idea of using linked text boxes only when needed, that is the plan.

Frosty
08-20-2012, 10:24 AM
Ahh... how often would those boxes need to be modified? Couldn't you dynamically link them as needed within a single document, and then unlink them immediately after being edited? You might not need to split documents then.

MacroShadow
08-20-2012, 10:44 AM
Cool!!! That's an idea!

Frosty
08-20-2012, 12:12 PM
It's a total spitball. I have done only the most cursory work with linked text boxes... so I'm not sure what's possible and what isn't. Let us know what you come up with.

fumei
08-20-2012, 12:27 PM
Dynamically linking and unlinking? It still seems like an extraordinary amount of work for what it is worth. What defines "as needed"?

Frosty
08-20-2012, 01:15 PM
Actually, as I explore a little bit more... I realize I misunderstood the limitation. You're saying that you can't have more than 32 consecutively linked text boxes (i.e., 32 text boxes all linked together is the limit, rather than 32 links being the limit).

It appears to me that you can have an unlimited number of linked text boxes... you just can't have more than 32 in a single chain.

What problem are you trying to solve that you're running into this limit? Can you post a demo document? Because I can't imagine that this limitation would pose a problem that isn't solvable in some other way, without VBA (or more simply than having to code the dynamics of breaking 32 links and then recreating those links)...

Frosty
08-20-2012, 01:23 PM
Sorry, I have read the thread. But if you could give a demo of the formatting you're using to get your 2 column footnote options and how you run into the 32 consecutively linked text boxes limit, that would be helpful.

If I recall correctly, you've been working on newspaper-type publishing but using Word, right? I can't visualize how you run into this problem, since you can obviously start with a new linked chain on each footnote (or a new page)... so it would only be a single footnote running through 32 individual textboxes where you would hit this limitation (unless I'm missing something).

But you can have hundreds of linked textbox pairs (only 2 in each "chain") in a single document (which is how I'm thinking your 2 column "footnotes" would work).

And on the odd occasion when you need the footnote to roll over to another page... you could simply create the link at that time (whether manually or with a bit of code).

Frosty
08-20-2012, 01:29 PM
And, incidentally, it seems as if creating a longer chain is possible... but it seems to require connecting two larger chains.

So, while I cannot connect a 33rd text box to an existing 32 text box chain... I can connect two 20 text box chains together.

It's a bit of a math problem what that makes the actual max chain... but I think it would be something like 31x31... right?

Frosty
08-20-2012, 01:37 PM
Here's a sample document I worked with, just proof-of-concept.

MacroShadow
08-23-2012, 11:45 PM
I haven't actually started it yet I'm only bouncing ideas at this stage. The limitation may be ran into if the footnote spans more that 32 linked text boxes, which is possible in long footnotes especially if more than one column are used.

Frosty
08-24-2012, 09:05 AM
Well, if it's all theoretical... then I'm going to say it's a waste of time to try and solve a problem which hasn't arisen yet. Maybe I'm not visualizing it correctly, but it seems to me that in a 2-column format, you're still talking about hitting this limit on a *single* footnote which would span over 16 pages.

That seems like a reasonable limitation to me (and the attached document would show you how to get around that limitation, if necessary).

In that case, I would tell the author of the footnote to start a chapter devoted to the concept he/she is trying to footnote. :)

MacroShadow
08-25-2012, 10:47 AM
I'm trying to enable users to publish word documents using word. I would like to be prepared for all possibilities.

Anyway thanks for the help, I really do learn a lot from you!

macropod
08-25-2012, 03:05 PM
Seems like a solution looking for a problem to me. I do not recall ever seeing a publication in which footnotes were required to appear in multiple columns when the text was in one column, or vice-versa. The nearest I've seen is where a number of cross-references have appeared in footnotes, all on the same line - but then it could be anything from one to four on a given page.

In any event, if people are trying to do professional publications, they should use a desktop publishing app like Publisher, not Word. Word is a Word processor, not a desktop publisher.

If you really "would like to be prepared for all possibilities", you might as well teach them how to do it in Excel too.

fumei
08-25-2012, 05:01 PM
here, here.

Word is not a desktop publisher.
Word is not a desktop publisher.
Word is not a desktop publisher.
Word is not a desktop publisher.
Word is not a desktop publisher.
....

Frosty
08-27-2012, 09:45 AM
I will third(?) the notion that you're really trying to do a round-peg-square-hole thing here.

That said, I won't try to convince you to do otherwise, as we've done this in other threads as well. But I would urge you to only deal with the problems as they come up, rather than the theoretical problems.

You avoid the theoretical problems by using the right application for the job. You're giving Word a task it was not designed to do. It is inevitable you will run into problems. But I wouldn't go looking for them.

Paul's analogy is really sound. Just because Word 2010 has some "equation" functions, doesn't mean you should start investigating where it breaks down in trying to do special relativity differential calculations.

MacroShadow
08-27-2012, 02:03 PM
I do not recall ever seeing a publication in which footnotes were required to appear in multiple columns when the text was in one column, or vice-versa. The nearest I've seen is where a number of cross-references have appeared in footnotes, all on the same line - but then it could be anything from one to four on a given page.

I have seen many books in a multi-column layout that have the footnotes formatted in two columns, where the first column flows over to the second column. (not all footnotes are under the column that the reference is in).

macropod
08-27-2012, 11:15 PM
I have seen many books in a multi-column layout that have the footnotes formatted in two columns, where the first column flows over to the second column. (not all footnotes are under the column that the reference is in).
That merely confirms what I've said all along. See post 9. There is nothing special about having a mult-column footnote arrangement in a multi-column document. Word fully supports that without your linked textbox contrivance.

MacroShadow
08-28-2012, 02:11 AM
If I use the built in footnotes, the two columns will not necessarily begin at the same height of the page and neither will a footnote from one column flow over to the next.

macropod
08-28-2012, 03:45 AM
That's a lame excuse if ever there was one. Neither will linked textboxes. Even so, using Word's built-in tools is;
a) less complicated; and
b) more likely to achieve the desire result (if you know how to use Style formatting appropriately),
than mucking around with such a ill-conceived kludge.

As i said, you have a solution looking for a problem. A total waste of time.