...and here's another geeky one. Targeted at a even more niche audience, the Poorhouse imagines.
Anyone who has already experienced the "joy" of controlling Microsoft Publisher from another application via Visual Basic for Applications (VBA) may have noticed quite a bit of trial and error seems to be needed, unless that's just the way the Poorhouse codes. Which it is. Anyway, moving on...after an application was upgraded from Publisher XP to 2003 it suddenly stopped working.
Whenever the calling application (an Access database as it happens) tried to "autofit" - that is enlarge or reduce the size of text so it perfectly fits into a surrounding text-box using the "best fit" method - the following useful-as-ever Microsoft error message flashed up and crashed the program.
Method "autofittext" of object textframe failed
Run-time error -2147467259
FYI, the code involved was simply this:
.TextFrame.AutoFitText = pbTextAutoFitBestFitNot much room for error, huh?
In actuality, the Poorhouse never really solved this problem. It seemed to have something to do with trying to fit a lot of text into a small box. But not that small, nothing unreasonable. Which is annoying.
But in classic style, after many iterations of non-working bit of Poorhousian random trial and error it turned out that it was generally the "best fit" parameter of the command causing the problem. "Best fit" is just one of 3 autofit options. Changing it to use the "Shrink on overflow" option a la:
.TextFrame.AutoFitText = pbTextAutoFitShrinkOnOverflowseemed to make the message go away. Of course, "shrink on overflow" is different from the full hardcore best fit insomuch as the text only changes size if it is too big for the box, not too small. Well, for most places you might need this, including the Poorhouse's dodgy app, just program the text to suddenly leap to point size 10 billion or so first, thus guaranteeing it is too big for the box and letting "shrink on overflow" work its autofitting magic. Not pretty, but it worked in the absence of finding a real solution.
As to the real solution, ideas welcome. Is it a Microsoft bug? Surely not!

Recent comments
1 year 2 weeks ago
1 year 6 weeks ago
1 year 7 weeks ago
1 year 7 weeks ago
1 year 7 weeks ago
1 year 7 weeks ago
1 year 7 weeks ago
1 year 8 weeks ago
1 year 8 weeks ago
1 year 9 weeks ago