Manipulating filenames in Excel or Access, or VB/A

Do you often need to manipulate filenames in VBA ?Here’s a small set of very useful functions that I regularly use: GetFileExt

Get the file extension part of a filename, without the leading dot (“.”). Example (type in immediate window):

  StripFileExt

Get the left part of a filename (and path), without… Continue reading Manipulating filenames in Excel or Access, or VB/A

How to measure any text with Word, vba code included

If you’re trying to put up a nice document template with Microsoft Word® you’ll probably have to precisely position different elements of your composition. When these elements are text, it may help to know precisely how much space you need to preserve for their layout. Sometimes, this can even be tricky. My previous post is the starting… Continue reading How to measure any text with Word, vba code included

Published
Categorized as Software

How do I compute the length of the longest text for a date in Word ?

A Word document to compute the length of the longest text for a date in Word. Working on the layout of a Microsoft Word French and English versions of a document template with a customer, we were trying to determine where to position a tab, so that we had the document date appear on the… Continue reading How do I compute the length of the longest text for a date in Word ?

Comment connaître la longueur du plus long texte de la date du jour de l’année avec Word ?

Je travaillais hier matin avec un client sur son modèle de lettre Word. Sur ce modèle de lettre que l’on veut décliner en français et en anglais, la date est positionnée grâce à un tabulateur, vers le bord droit de la page. On a naturellement écrit la date du jour, lundi 18 janvier 2016, pour… Continue reading Comment connaître la longueur du plus long texte de la date du jour de l’année avec Word ?

Tracking active directory user logon/off for the just cause – Part 1

Doing some work remotely, typically using a VPN to access our customer(s) network, or some other type of remote access software (like TeamViewer) is unavoidable when we’re maintaining our customers infrastructures. The recurring problem I encounter and that initially got me started on tracking user logons and logoffs is to determine a convenient moment where… Continue reading Tracking active directory user logon/off for the just cause – Part 1

A pure (windows) “C” version of urlencode

This is a windows pure C language version of a urlencode() function.Sometimes, when I need simple tools and self contained windows EXEs (“just run it”, no “dll”s to copy or register), I find it simpler to code in C than in other languages. Particularly when you want to link with specialized libraries available only in… Continue reading A pure (windows) “C” version of urlencode

How to get the same result in VBA and in PHP computing a CCITT CRC checksum

I was working last week on a Microsoft Access application and I needed to get some data from a webserver running Apache/PHP. Exchanging data with the server was easy, the WinHTTP and XML ActiveX library components are really cool and easy to use for that. But then I came unto some unexpected trouble when I… Continue reading How to get the same result in VBA and in PHP computing a CCITT CRC checksum