Wilkommen, Bienvenu, Welcome... Sziasztok!

Welcome to The Lotus Position, an intermittent collection of extempore navel gazings, ponderings, whinges, whines, pontifications and diatribes.

Everything is based on a Sample of One: these are my views, my experiences... caveat lector... read the Disclaimer

The Budapest Office - Castro Bisztro, Madach ter

The Budapest Office - Castro Bisztro, Madach ter
Ponder, Scribble, Ponder (Photo Erdotahi Aron)
Showing posts with label Word 2002. Show all posts
Showing posts with label Word 2002. Show all posts

Tuesday, 22 July 2008

Windows Cannot Find... Resolved!

Ha!

Recently, whenever I double-clicked a Microsoft Word (Word 2002/Word XP) document, Word would start but I would also get an error message from Windows that ""Windows cannot find..." and then the full path to the file I just double-clicked . Naturally I was able to open the file perfectly well once Word was running.

I don't think the general cause or symptoms are application or Windows version specific, so the hint should be good across the board... Vista, XP...

So what gives in this particular case? It could have been a shortcut whose target no longer exists, a missing registry entry perhaps, or if it had been an Excel document (Excel ~20020 ) it might have happened if Excel had been set to ignore other applications - but it wasn't, though the Excel thing a clue (it's a DDE - Dynamic Data Exchange - thing in the end... (or Automation (as they call it now, I think)).

In this case it was all to do with "AutoExec" - which was taking too long to run (lots of Programmatic Stuff). Microsoft has a knowledgebase article for Word2000 that says if AutoExec includes a "Wait" this error can arise, but it's really not the waiting that's important it seems, it's how long the AutoExec takes to complete before Word can respond to the Windows instruction to open the file.

So, the message "Windows cannot find..." is, not unusually, completely misleading: Windows can, has found the file - but the application requested to open the document hasn't responded in time.

And that's it really... to work around the issue I simply took all the long winded stuff out of AutoExec, put it in "delayedAutoExec" and put in this line in the leaner, slimmer, more responsive AutoExec. The delay is short but just long enough for Word to OK the document open request.

Application.OnTime when:=Now + TimeValue("00:00:05"), Name:="delayedAutoExec"

I expect it's also going to cure the bizarre error that was "Application.Activate" failing (during the AutoExec code) because there wasn't, as far as VBA was concerned, any Application to activate!

et voilà, the file is no longer not found.

Pie/Cake Stuff.

Wednesday, 12 September 2007

Suggestions for Microsoft Word 2007

I'm only doing this because Microsoft are limiting me to 650 characters on the Office.com suggestions page - and I bet it can't count accurately anyway (web pages never seem to count characters properly, never allow enough space so you can see what you've written - Office.com has a miserly 3 line display and seem generally set up to discourage detailed and specific suggestions; I wonder if that's because they typically get "Your app sucks!" and just don't want more of the same? Chickens and Eggs here I suspect).

So, away from the chickens and on to the sheep!

This is almost entirely about the way comments are handled as "mark-up" in Word 2007; whilst I quite like the new Ribbon UI, I shan't be using Word 2007 - and hence any Office 2007 products because of (persistent) shortcomings in the way it handles comments. Pity. What has been done since Word 2002/XP in the comments area is... negligible it seems. Minimal comment handling probably goes even further back, but I can't check, so I shall make an unsupported assertion and claim that it's never really been thought through.

Firstly, W07 now highlights commented text automatically - and does so in a colour corresponding to the reviewer who created the comment, unfortunately either you accept colouration by reviewer name or you choose from a woeful palette whose colour content hasn't changed in living memory.

Would it not be a marvellous thing to have Categorised commenting via some sort of tagging system, and for the user to be able to create their own categories/tags? For example, one tag for "factual error", another for "dubious fact", another for "unclear phrasing"; or one for "minor issue", one for "medium issue", one for "major issue" - and so on.... with the specific ability to be able to apply multiple tags to a single comment. It would, wouldn't it? I've already done the same thing for Word 2002 using VBA. If only I had the choice of comment colours...

Then one can add (as I have done) features to selectively show and hide comments according to the assigned tags, which makes reviewing a lot easier; and to sort the reviewers list (more of a work-around really...); and to selectively review comments by category and and and...

One should also be able to control whether highlighting of the commented text is on or off, where applicable (done that - it's dynamic... click in the comment and the "scope"is highlighted, click elsewhere and it unhighlights). I mean, really! This is Microsoft at it's most nannyish - you must have comments highlighted, all the time... it will only end in tears if you don't!

And one should of course be able to delete the content of a comment without deleting the comment itself; as it is, try Ctrl+A in W07 with the selection point in a balloon comment and hit Delete or Backspace. It doesn't work because Ctrl+A has picked up the trailing paragraph mark, which is undeletable. It would be easy to fix - and it should be.

Of course the comment pane is now in the right (or maybe you can choose where it goes, I'm just going by the Test Drive default presentation) - all I can say is I hope it deals with large numbers of comments... I have about 5,000 now in "IT" (the book) - all automatically numbered starting at 1 for each category. I don't see any reason why there should be any limit on the number of comments and I haven't hit one yet, but repagination is a pain on a large document when it keeps doing it because of changes to comments - I can understand it for footnotes, but comments? [Hope I'm right about that - I think so, but...]

Alas my VBA ain't perfect - because I haven't had time to productionise it - otherwise I'd sell it as an add in... along with outlining for tables similar to the way Excel does it (no, you still can't use the document map to navigate within tables. But that's another topic.)

OK - I can send them the URL now!

Saturday, 4 August 2007

Why You Don't Want to be a Geek II

Because Geeks do things like this

(I'm not going to spoil it for you just yet...)

I am now fiddling with Chris Barker's PERL program Syllabify.pl, attempting to turn it into Visual Basic for Applications so that I can run it under Word and then do my own Flesch-Kincaid scores etc.. Unfortunately, I don't know PERL, but what the hell, I DO STUFF - shouldn't be too hard... ooh, er... grep... that's Unix stuff, a kind of Stuff I Do Not Do...

Hmmm... I feel a Dr Seuss moment coming on...

*************

There is Stuff I love to do.
Do you like the Stuff I do?
Do you like my Kinds of Stuff?
Is my Stuff your Kind of Stuff?

I do Stuff that's odd and queer.
I do Words like There and Here,
And Hither, Whither, Whence and Hence,
And Protoplasmic, Turbulence.

Words are Stuff I like to do!
Do you do Words the way I do?

Do you make them twist and shout?
Do you turn them inside out?
Do you like to tweak their noses?
Do they feed your odd neuroses?

I do Stuff! It's Stuff I do!
Does doing Stuff appeal to you?
What Kinds of Stuff do you find nice?
Would you like finding rhymes for "nice"?

I would! I do! It's Stuff you see!
And Stuff is very good for me.
Stuff is endless; Stuff is great!
Except the Kinds of Stuff I hate.

Unix Stuff I Do Not Do.
Unix Stuff should be Taboo!
Access too is Stuff I don't!
Sociology I won't!

Apart from that, I'm cool with Stuff:
There never seems to be enough!
And Stuff is everywhere you look –
In every picture, every book!

Stuff is Why, and How, and When
And If perhaps, then maybe Then.
Doing Stuff is What I Do
I'm Mr Stuff - and who are you?

*************
So what Kind of Stuff did I stumble upon in that very first link?

Haiku "discovered" in Linux documentation. My personal favourite was:
I suppose you have
to fiddle around a bit
to get this working
-- Werner Hauser, Linux Laptop HOWTO
It's a wonderful world!

PS According to Microsoft Word, The Flesch Reading Ease score for the above pseudo-Seuss is 100, and the Flesch-Kincaid Grade level is 0.7

Stuff is Easy!

Thursday, 2 August 2007

Why You Don't Want to be a Geek (The Flesch-Kincaid Formula is Wrong)

Well, I'm not sure if "Geek" is the right word - perhaps I mean "Nerd"? - but you can see the problem instantly: obsessing about the trivial. Does it really matter which word I use when, whichever I do choose, you know full well (or will do by the time you've read this, or other parts of the blog) that this guy...

a) Is Eccentric (I'm English; "eccentric" is not only acceptable, it is possibly even mildly flattering...)
b) Is Quirky (thanks for that one Gary)
c) Isn't Two Bricks Short of a Load - in fact probably has two loads of bricks, but doesn't know what to build with them
d) Is Weird

i.e. is, not to beat about the bush, more than slightly geeky, possessed of a high coefficient of nerdulence (let's make that my CoN for future reference)

The nicest reflection I've had on my idiosyncratic disposition is that "Julian doesn't just answer questions that no one else can, he answers questions that no one else even thought of asking."

Sadly the corollary to that is probably "Actually, he answers questions no one else thought worth asking," (some examples later) but...

Here I am, brain the size of a (dwarf) planet and it's full of Stuff! And useless Stuff at that.

Life, don't talk to be about life... (Actually, do talk to me about life - isn't it fascinating?)

However, about those sheep...

What prompts this (hitherto promised but thus far undelivered) piece of naval gazing?

The Flesch-Kincaid readability statistics, Reading Ease and Grade Level as implemented in Microsoft Word (hopefully as per DOD Standard MIL-M-38784B. Detail! The Geek or Nerd must attend to detail... which means, having finally tracked it down, that MIL-M-38784 of July 1995, superseding MIL-M-3978C of October 1990... still with me? ... doesn't in fact contain the Flesch-Kincaid formulas... at least any more. Maybe it did. Who knows?)

And what is the precise problem?

I had Word do the readability statistics for IT - Reading Ease 83.2, Grade Level 5.9. So far so good (in fact rather too good - I don't believe an 11 year old could read IT). But then I noticed that the formulae:
  • Grade Level = (0.39 * Average Sentence Length) + (11.8 * Average Syllables per Word) - 15.59
and
  • Reading Ease = 206.835 - ((1.015 * Average Sentence Length) + (84.6 * Average Syllables per Word)
would allow me, given the stats I had, to work backwards and calculate the average number of syllables per word (ASW), which is of course Trivial and therefore, almost by definition, of riveting interest to the Geek or Nerd.

So, I invert the formulae, plug in the values and uh oh! I get two different answers.

Check I've got the formulae right in Excel and then that I get the right answers for something (I used the Dr Seuss Green Eggs and Ham stats in the Wikipedia article on Flesh-Kincaid - advanced warning/plot spoiler: I think they are using the wrong formula at the moment) - which I do.

So, is Word miscalculating or is the problem that the ASL of 18.6, Reading Ease and Grade Level scores are all inappropriately rounded...?

Hmmm...

Some time later...

Word says there are 18.6 words per sentence, but using its own figures for word count and sentence count the average appears to be 19.16 (2 S.F.). Aha! Word's Average Sentence Length is Wrong! But no, that doesn't fix it. Nor does undoing any rounding that may have occurred.

So what's going on? Beats me. I blame Microsoft.

Hastily, and erroneously it seems. I found somewhere else on the web a slightly different version of the Grade Level formula.. it should in fact be:
  • Grade Level = (0.39 * Average Sentence Length) + (11.8 * Average Syllables per Word) - 15.9
And then, once you've made allowances for rounding errors in Word's stats, everything seems OK at last (well, almost, to get precise agreement that constant has to become 15.96536ish - I think I'll settle for 15.9, it's close enough)

Except that the Word help files says they use the value 15.59.

But at least I can semi-reliably calculate the average number of syllables per word in IT. We'll talk about the ARI, Gunning-Fog and Coleman-Liau indices some other time...

Now wasn't that worthwhile? No. This is why you don't want to be a geek.

Now, as to the Meaning of Life as to be revealed in "IT", what is it - exactly?

Well, the answer is:

The Lotus Position has unexpectedly encountered an error. Connection Refused by Host Either you do not have permission to access the site, your password is incorrect or you have failed to understand the question...