1 - 4   [4]

M$ Office Worth Every Penny!?

Also relates to The Office

Nothing like a full day of work on an Access database only to be told:

Error accessing file. Network connection may have been lost.

All thanks to this bug, requiring this patch and these patches to fix. Totalling more than 100MB of downloads, I decided to backtrack through the night rather than crank my dial-up to the extreme. Well, its not as if MicroDollar products cost money! I rarely use this software now except for clients (hence the reason I had never patched it previously), but a bug as glaringly obvious as this should never have found its way into the software in the first place!

The final straw - it is time to get a hold on UNO and start migrating to OpenOffice

Posted on Jan 19, 2005 at 19:54:24. [Comments for M$ Office Worth Every Penny!?- 1]

PHP COM for Outlook to Access

Also relates to PHP and COM

I had an urgency earlier today to produce a script to extract details from the body of a number of emails and put the information into an Access database. For any seasoned VB programmer this would seem like a trivial task I am sure, but having become quite accustomed to using the PCRE library to manipulate and extract text, the thought of becoming embroiled in text searching subroutines using VBA's InStr and Mid functions quickly had me concocting alternatives. If only I could get the body of the emails into some PHP arrays and use the well-seasoned preg family to get the information I needed. Time to call on the Windows COM extension once again.

In fact, getting to an email item is considerably less cumbersome than working with Excel via PHP COM. The messages were stored in a subfolder of the Inbox called Enquiries.

$outlook = new COM("Outlook.Application") or die('….');
$ns = $outlook->GetNamespace("MAPI");
$inbox = $ns->GetDefaultFolder(olFolderInbox);
$subfolders = $inbox->Folders;
while ($folder = $subfolders->getNext()) {
   if ($folder->Name == "Enquiries") {

So now $folder references the subfolder Enquiries and I just needed to cycle through each mail item in this folder to grab the body.

$mail = $folder->Items;
while ($item = $mail->getNext()) {  
  $temp = array();
  $temp['body'] = $item->Body;  
  $temp['date'] = date('d/m/y', $item->ReceivedTime);
  $enquiries[] = $temp;

While I was about it, I also grabbed the date each message was received. Conveniently the PHP COM returns this property as a Unix(!) timestamp so it can be fed straight into date() to get the required output.

A few regular expressions later and the data was transformed into an SQL string ready to feed into MS Access. Sticking with the Windows theme, the inbuilt ODBC functions seemed the best bet for this, once Null values had been handled and a System DSN established.

I am in no way promoting this as a method to go about transfering Outlook data to Access. It just demonstrated the flexibility PHP can offer. I needed to do some heavy duty work on the body text to create the field/values I needed and since PHP is the language I use on a daily basis, I found it less time consuming to build this bridge than to dust off and start trawling through old VBA references.

This is one of many areas where Thunderbird shines for me - emails stored in text format ready to be grep'ed.

Posted on Nov 19, 2004 at 03:37:36. [Comments for PHP COM for Outlook to Access- 0]

All New ZX Spectrum

Also relates to Nostalgia

I can once again say I own a speccy! The colourful front panel of the ZX Spectrum 48K with its noticeable rainbow logo In fact it is the first ZX Spectrum 48K I have ever owned. By the time I convinced my parents we needed to upgrade our ZX81 first time round (i was pre teen then!), the ZX Spectrum Plus was on the market. So the rare opportunity I had to caress those colourful rubber keys was on visits to my Grandad who had become quite pre-occupied with writing BASIC software for every game and quiz show he could think of. Sadly his early versions of Countdown, Trivial Pursuit and a precursor to the key thumping Daley Thompson's Decathlon called Greasy Poles never made it into the software houses, but they used to keep me and my brother very entertained on family trips.

Well my grandad's old computer has now been passed on to me, along with an entire shelf worth of Spectrum programming books, several megabytes worth of hard drive in the form of several box loads of cassettes, and, notebooks containing all his code snippets and full program listings - full being about 2 pages in some instances! At first the keyboard failed to respond, but a quick dive under the hood, and a little sticky tape later, I was tapping away at those auto-complete Sinclair BASIC programming keys. It is amazing to think that this machine, at only 22 years old, had a mighty 48KB of system RAM, a standard cassette deck as a hard drive, 8 colours and just plugged into the television aerial.

To quote the cover of a BASIC programming book from 1983

The incredible ZX Spectrum presents its user with virtually unlimited scope. It allows versatile use of colour, offers high and low resolution graphics and also adds sound. The result can mean some very effective and exciting programs from BASIC - if you just know how! The Art of Programming the ZX Spectrum by M. James

Indeed! By the time I had reached my teens, and with Manic Miner and Jet Set Willy under my belt, I was insisting that it was time to once again upgrade to the Commodore. Bring on Wizball…!

It may not be very productive for me to while my hours away plugging code onto my television screen, but the occasional minute can always be excused as a brush up on BASIC!? If this entry has made you nostalgic, read up on the early 1980s history of computers.

Posted on Nov 05, 2004 at 22:20:44. [Comments for All New ZX Spectrum- 0]


Also relates to Java and The Office

Over the weekend I finally decided to give my modem a grilling and download OpenOffice.org. I have heard a lot of favourable reviews about it around the web and been wanting to do a comparison to MS Office for a while. Besides the four hour plus download time (inluding the developer manuals), I have been immediately impressed. At first glance it does not appear to have the depth of MS Office (I currently use 2000), yet at the same time, the GUI is visually clear and very easy to get to grips with. I had read in an Amazon review, I think, that the learning curve was quite steep. Well, I see this as far from the truth. If I were to recommend a suite for a newcomer to Office tools, I would certainly push this over Office. The interface presents less steps to some common formatting tasks, like table creation/insertions and style manipulation.

What I have found most exciting is the clarity and simplicity of building extensions using both Basic (OpenOffice version) and more extensive UNO interfaces with Java over TCP. My Java experience is not extensive, but I had a client-server connection up and running within a few hours with data manipulation functions on a Calc (Spreadsheet, Excel equivalent) file. Having built numerous application in VBA for Access, the Basic IDE was familiar, and the object library is readily navigable. The flexibility to program custom interfaces (with component libraries available for Python and C as well) seems to be far more available than in MS, where much information is buried away in cryptic files on MSDN. The Developer's Guide [Note 14MB PDF] and the API Reference Manual are both good places to start learning.

So, OpenOffice.org may not have the depth of features that MS Office has, or perhaps I haven't delved deep enough yet anyway? But, this is an Open Source Project, it does not cost anything, and is a must for a small business considering an alternative to MS Office or the starter MS Works. Perhaps the one thing it does lack is an integrated mail client, like Outlook, but then it would appear Mozilla can be readily integrated with it's own mail client.

Posted on Jul 13, 2003 at 23:56:29. [Comments for OpenOffice.org- 0]

Breadcrumbs Trail

[ Home ] -> TW Blog -> Basic
Site Map

The Severn Solutions website achieves the following standards:

[ XHTML 1.0 ] [ CSS 2 ] [ WAI AA ] [ Bobby AA ]

Page compiled in 0.005 seconds