Archive for March, 2007

Cleaning up 10 years of outlook history

When upgrading to Vista and Outlook 2007, I decided to go through various backups and get 10 years of outlook use into one mailbox file (outlook.pst). After collecting several different .pst files, I opened all in Outlook. Thereafter I moved mail messages from the backup .pst files into the current one. However, then a problemed surfaced: When moving a folder hierarchy of mails (e.g. “personal folders\archive\…”) between an old .pst file into a new one with an identical folder hierarchy outlook automatically create a sequence numbered folder (e.g. “personal folders\archive1\…”). This was not what I wanted, and not what you are used to when moving files around your harddisk(in that case you get a replace question or something like that).

Anyway, there was no easy solution here, other than going through that hierarchy and copying the contents of each subfolder in the backup .pst to the similar subfolder in the target .pst. After pondering about for close to an hour, I created this macro vbscript to do the job:

Option Explicit

Sub MoveToArkiv()

Dim objFolder As Outlook.MAPIFolder
Dim objFolderFromBase As Outlook.MAPIFolder
Dim objFolderToBase As Outlook.MAPIFolder

Set objFolder = Application.Session.Folders.Item("Personal Folders")

' Set the two next lines to the approprite to and from folders
Set objFolderFromBase = objFolder.Folders.Item("Arkiv3")
Set objFolderToBase = objFolder.Folders.Item("Arkiv")

' Recursively go thorugh the folders and subfolders, moving every item
MoveItems objFolderFromBase, objFolderToBase

End Sub

Sub MoveItems(objFolderFromFolder As Outlook.MAPIFolder, objFolderToFolder As Outlook.MAPIFolder)

Dim objFolderSource As Outlook.MAPIFolder
Dim objFolderTemp As Outlook.MAPIFolder
Dim objFolderTarget As Outlook.MAPIFolder
Dim blnFound As Boolean
Dim objMailToMove As Outlook.MailItem

For Each objFolderSource In objFolderFromFolder.Folders
blnFound = False
' check whether a similar folder exist in target
For Each objFolderTemp In objFolderToFolder.Folders
If objFolderTemp.Name = objFolderSource.Name Then
Set objFolderTarget = objFolderTemp
blnFound = True
End If
Next
' If not found, create
If Not blnFound Then
Set folderTarget = folderToFolder.Folders.Add(folderSource.Name)
End If

' For each subfolder runs this procedure
MoveItems objFolderSource, objFolderTarget
Next

' Then copy all items in the folder
For Each objMailToMove In objFolderFromFolder.Items
objMailToMove.move objFolderToFolder
Next
End Sub

To use it edit the two lines at the top to set the correct base folders for moving from and moving to. The script was used with Outlook 2007 but should work on Outlook 2003 as well.

March 24, 2007 at 12:08 am 3 comments

Back to OS/2

One of my biggest computing interests is operating systems. At least it used to be. Of course, as anyone with some experience in the IT industry, I have tried several, including – for the record – Windows (2.1, 3.1,95, 98, Me, NT 3.5, NT 4.0, 2000, XP, Vista, CE, PocketPC), Dos 2-Dos 7, OS/2 (2.1, 3.0, 4.0), Linux since kernel version 0.96 (1992), Solaris, HP-UX and other Unix variants, Symbian and BeOS,real-time operating systems like pSOS, VxWorks, Windows CE, Integrity, Nucleus, QNX, OSE, LynxOS, Symbian and others.
The greatest of them all I used to think was OS/2. I even went to WarpStock in 99. Well, I still think so. However, IBM killed it by not updating it and not releasing new drivers. And they did not make it open source. The greatest thing about OS/2 was of course its object oriented build and interface, and all those nifty applications one were able to build by replacing or extending a single component of the OS.
Anyway, the reason I mention this is that I have just tried Microsoft Virtual PC 2007, and I really smiled when discovering it has OS/2 support! It did not take me long to get the old OS/2 Warp CD and install it as a virtual machine on my pc running Vista. Of course I could have used VMWare as I did a couple of years ago. But Virtual PC seems to do the job as well.
Whether OS/2 still looks that great I am unsure of. After all, things has improved in the world of personal computing since 1994. XP and the Vista user interfaces are better (but not object oriented). Some of the Linux windows desktops also look good. Still it was fun to have another run at OS/2!

March 4, 2007 at 8:25 pm Leave a comment

/Maxmem support in Windows Vista

High-performance hardware from time to time needs direct access to memory in order work properly. That is the case with the excellent Matrox Imaging line of framegrabbers. In particular, I am using the Meteor/2 family of framegrabbers (a framegrabber is used for capturing images from a camera, usually for industrial, medical, or surveillance purposes). The driver and library that comes with these framegrabbers, Matrox Imaging Library, ensures during installation that the framegrabber has direct access to memory by adding a switch to the Windows XP’s (or NT or previous versions of windows) boot.ini file: /MAXMEM=xxxx where xxxx is the upper limit of memory (in MB) that windows will use. For example

multi(0)disk(0)rdisk(0)partition(1)\windows=”Microsoft Windows” /MAXMEM=2040

This lines reserves 8 MB (of my computers 2048 MB memory) for direct use by the framegrabber.

However, with Windows Vista this possibility changed. It does not use the boot.ini file any more. Instead, one has to use the Boot Configuration Data Editor or bcdedit. This utility can be run from the command promt (but remember to run the command prompt “As administrator” – by rightclicking and selecting “Run as administrator”).

BCDedit is explained here, at Microsoft Technet. /Maxmem is replaced by the option TRUNCATEMEMORY, and in order to get the same effect as the example above try from the command-line prompt:

bcdedit /set TRUNCATEMEMORY 2139095040

As can be seen, the limit 2040MB now needs to be specified in bytes.

After a reset, going into Control Panel – System, you can see that it has worked. In order to remove the limit, try

bcdedit /deletevalue TRUNCATEMEMORY

There should probably be a warning here: “Don’t try this at home”. Or at least don’t try it if you don’t know what you are doing. Of course, by the level this is documented by Microsoft, no one knows even half of what they are doing, so …

To the end of the story, I have not managed (yet) to get Matrox Imaging Library 7.5 to run properly on Windows Vista. On the other hand, as this blog explains, I managed to reserve memory for direct use by the hardware.

March 4, 2007 at 7:31 pm 7 comments


Calendar

March 2007
M T W T F S S
 1234
567891011
12131415161718
19202122232425
262728293031  

Posts by Month

Posts by Category