Posts Tagged ‘tools & tips’

Oh, what an exciting life I lead. My first post, in the early AM of the first day of the year, and what is the topic? Coding. Woohoo! Happy New Year!


Following a Computer Cock-Up Of Monumental Proportions, which I might or might not expand—or, indeed, expound—upon in a later post, I ended up upgrading from Office 2003 to Office 2010 a couple of weeks back. Anyone who remembers the experience of changing from the menu-based to the ribbon-based interface will, I hope, understand and sympathise with my profound sense of, erm, call it culture shock. Not only that, but I lost not only all the customisations and macros I'd made to Word over the years, but also the back-ups of same, which were on a USB hard-drive which got wiped during the course of the CCUOMP. (It's pronounced "queue-omp.")


Read Full Post »

A Fix For Get_IPlayer on XP And Vista

A post for anyone who uses Get IPlayer on Windows XP or Vista.

If you've installed the latest update—necessary 'cause Auntie Beeb changed some stuff—you'll most probably have received this message, when trying to use it:

ffmpeg.exe – Entry Point Not Found
The procedure entry point GetNumaNodeProcessorMaskEx could not be located in the dynamic link library KERNEL32.dll.

Then you'll probably have found that after you've clicked OK on the warning message the several times it appears, it'll still download the TV programme, but it won't convert it to mp4 format. Which is a bit of a bugger. As is the fact that the help forum's rules state that XP and Vista aren't supported; and they seem to apply that rule rather strictly. (I understand why the developers might not want to have to keep trying to find fixes for old systems, but personally, I don't see why a thread couldn't be kept open for ordinary XP and Vista users to share advice amongst themselves. Ah well, their site—their rules.)


Read Full Post »

It's a thing which annoyed me a little until I found out that users of later (2010 and on) versions of M/S Word than mine could do it. Then, while it still would never have featured anywhere near my top ten list of Most Annoying Things Ever, the green-eyed god on my be-chipped shoulder certainly hoisted it several feet further up the flag-pole of pesky annoyances….

If you have a macro which makes multiple changes, each of them is added to the undo stack separately, which means, obviously, that you have to hit the undo button or Ctrl+Z multiple times to undo those changes. Which is kind of a bugger if you're unsure how many changes it actually made, either 'cause you've forgotten the workings of the macro or 'cause there's a few if…then clauses in there.


Read Full Post »

How Many Days In A Month?

Mother very thoughtfully made a jam sandwich under no protest.

That, Gentle Reader, is a now-outdated mnemonic for the order of the planets going outwards from the sun. (The T is for Terra, an alternative name for the Earth.) The suggestions for non-Plutonian versions given on The Fount Of All Knowledge™ seem lacking to me in that, unlike the above, they omit the asteroid belt; but I must admit I do quite like "Mary's 'virgin' explanation made Joseph suspect upstairs neighbour."


Read Full Post »

T'other day, I knocked together a macro, for a friend, to number the paragraphs in a Microsoft Word document ("manual" rather than hard-coded numbering, that is):

Sub NumberingParagraphs()

    Dim iParagraphs As Integer
    iParagraphs = ActiveDocument.Paragraphs.Count
    Selection.HomeKey unit:=wdStory
    Do While iCount < iParagraphs
        iCount = iCount + 1
        Selection.TypeText iCount & ": "
        Selection.MoveDown unit:=wdParagraph

End Sub

My mate, being curious about, but not having experience of, the workings of such things, took a look and got the basic idea, but couldn't get his head around why the number of loops is seemingly instructed to be one less than the number of paragraphs. Surely, he said, it should be "less than or equal to," rather than "less than." Well, no. His kid got it straight away, and came up with a lovely semi-analogy; which I now share, in hopes that others who've been puzzled by this oft-seen seeming-paradox might see the light. Let's literally (yet figuratively) walk through the macro…


Read Full Post »

So whadapp'ndwas, someone cited Wikipedia's article on the Qur'an, but instead of posting that link to the regular desktop version, they posted the mobile version instead. And I have to say, even on my desktop I prefer the cleaner, uncluttered mobile Wikipedia to the regular version. So much so, in fact, that I spent a fruitless half-hour trying to find a script or add-on which would allow me to always be directed to the mobile version. The closest I got was finding an old toggle-between-the-two one for Chrome which, according to the comments on the page, no longer works.



Read Full Post »

This browser does not support video playback.

I've gotten used to switching to a different browser when the above message appears on videos posted on Twitter. Every now and again, though, I get frustrated and spent absolutely ages trying to find a reliable way to get the damn things to play in Firefox or the Firefox-derived Pale Moon, which is my current default browser, but I've never yet had any luck. And the sheer number of search-results leading to other people's attempts to solve the same problem convinces me that it's an extremely common problem.

Proposed solutions generally include all the stuff most of us have already tried before resorting to searching message-boards for answers. Updating flash and enabling or disabling flash or HTML5. Then there's suggestions regarding changing various entries in the about:config page. Some of the discussion gets esoteric to say the least and none of it seems to work. Either you have the problem or you don't, and if you do, it seems that by and large you're stuck with it. So back to opening a second browser then.


Read Full Post »

When I were but a wee nipper, the words "billion" and "trillion" were hardly ever heard, outside of hyperbole, unless one had an interest in astronomy and cosmology. (And even then, we had to be careful in our reading, since the nationality of the author and the editorial policies of their British publisher might make a difference, what with our billion being, until recently, a thousand times larger than the American billion.) These days, "billion" is much more often seen, mostly because of the now-universal adoption of 109 rather than 1012 as the definition of the word, which brings things like world population and national debts into its range; and on the topic of national debts, "trillion" (also shrunken by a factor of one thousand in UK terms) is, distressingly, coming into much more common usage. Which is partly why I found the idea of Microsoft Word's cardtext feature, which converts figures into words—but only up to 999,999—rather less than useful.


Read Full Post »

A goodly while back someone, somewhere, asked me if there was a workaround for this and I said I'd get back to 'em. Problem is I can't remember where the question was asked, so I'm just going to post it here and hope they read the blog…

There's an easy way, in VBA, to tell if a selected string in a Microsoft Word document is a number:

Sub IsNumber()
  If IsNumeric(Selection) = True Then
    MsgBox "It's a number"
    MsgBox "It's not a number"
  End If
End Sub

(It will count strings with commas and/or full-stops* (used as decimal points) in them as numbers provided everything else is a digit.)

* That's "periods" to some of you strange foreign types.

Unfortunately there's no equivalent method for telling if a string contains nothing but letters, and that's the workaround I was asked for. Well, my first thought was something like this:

Sub Sub IsABC()
  If Selection.Range.Case = wdLowerCase Or _
   Selection.Range.Case = wdTitleWord Then MsgBox "All letters"
End Sub

… but with a complete list of possible cases instead of just the two in that example. Unfortunately, it turns out that provided the selection includes letters, it'll quite happily report spaces, commas, hyphens etc and even numbers, as being letters. Select one of those things on its own however, and it won't do so—which does leave us with the option of checking character-by-character. So here's my workaround. It ain't pretty, but it does do the job asked of it:

Sub IsABC()
  Dim iSelected As Integer
  iSelected = Len(Selection)
   iCount = 0
  Do While iCount < iSelected
   iCount = iCount + 1
    If Selection.Range.Characters.Last.Case = wdUpperCase = False And _
     Selection.Range.Characters.Last.Case = wdLowerCase = False Then
      Selection.moveend unit:=wdCharacter, Count:=iCount - 1
      MsgBox "Not all letters"
      Exit Sub
    End If
    Selection.moveend unit:=wdCharacter, Count:=-1
  Selection.MoveRight unit:=wdCharacter, Count:=iSelected, Extend:=wdExtend
  MsgBox "All letters"
End Sub

All it does is check the final character in the selection, then shrink the selection by one character and check again, until it either runs into something that's not upper or lower case (i.e., not a letter)—in which case it reselects the characters it's deselected and reports that the selection is "Not all letters"—or until it runs out of things to check, in which case it reselects the whole lot and reports that the selection is indeed "All letters." (Presumably, in actual use, it would make a Boolean true or false. I didn't ask what it was wanted for.)

Anyways, that's me lot. As ever, I hope this will be of help to somebody.

You may use these HTML tags in comments
<a href="" title=""></a> <abbr title=""></abbr>
<acronym title=""></acronym> <blockquote></blockquote> <del></del>* <strike></strike>† <em></em>* <i></i>† <strong></strong>* <b></b>†

* is generally preferred over †

Read Full Post »


I'll begin with a heads-up for John Zande. The first part of this might interest you, John, as I believe it meets a criterion you were asking about a while back.

A kind soul of my acquaintance took it upon herself to beta-test those macros I posted t'other day. Turns out there's a couple of bugs. Both are minor in that they're easily fixed, but one is potentially disastrous in that it causes what I (probably erroneously) think of as a feedback loop. So let's take a look at that first. (I would, in the normal course of things, just edit the post in question and publish a correction-post pointing it out, but as I say, John was asking for an example of this kind of thing a while back, so what the hell; let's expound on it a bit.)

The macro in question is the SelectTheWord macro, and the part that's buggy is this bit: (more…)

Read Full Post »

Older Posts »