Wednesday, 6 May 2009

My GTD for Outlook

Under construction


'Tag !Next and move'
Public Sub SetNext()
SetTag "!Next"
MoveSelectedItemsToFolder "_Ongoing"

End Sub
'Tag @Someday and move'
Public Sub SetSomeday()
SetTag "@Someday"
MoveSelectedItemsToFolder "_Ongoing"



'Tag Reference and move'
Public Sub SetWaiting()
SetTag "Waiting"
MoveSelectedItemsToFolder "_Ongoing"

End Sub

End Sub

'Tag Reference and move'
Public Sub SetReference()
SetTag "Reference"
MoveSelectedItemsToFolder "_Ongoing"

End Sub

'Tag Reference and Archive'
Public Sub Done()
SetTag "Done"
MoveSelectedItemsToFolder "Archive"

End Sub



Private Sub SetTag(Tag As String)

Dim objOutlook As Outlook.Application
Dim objInspector As Outlook.Inspector

Dim strDateTime As String

' Instantiate an Outlook Application object.
Set objOutlook = CreateObject("Outlook.Application")

' The ActiveInspector is the currently open item.
Set objExplorer = objOutlook.ActiveExplorer

' Check and see if anything is open.
If Not objExplorer Is Nothing Then
' Get the current item.
Dim arySelection As Object
Set arySelection = objExplorer.Selection

For x = 1 To arySelection.Count
strCats = arySelection.Item(x).Categories
If Not strCats = "" Then
strCats = strCats & ","
End If
strCats = strCats & Tag
arySelection.Item(x).Categories = strCats
arySelection.Item(x).Save
Next x

Else
' Show error message with only the OK button.
MsgBox "No explorer is open", vbOKOnly
End If

' Set all objects equal to Nothing to destroy them and
' release the memory and resources they take.
Set objOutlook = Nothing
Set objExplorer = Nothing


End Sub

Private Sub MoveSelectedItemsToFolder(FolderName As String)
On Error GoTo ErrorHandler

Dim Namespace As Outlook.Namespace
Set Namespace = Application.GetNamespace("MAPI")

Dim Inbox As Outlook.MAPIFolder
Set Inbox = Namespace.GetDefaultFolder(olFolderInbox)

Dim Folder As Outlook.MAPIFolder
Set Folder = Inbox.Folders(FolderName)

If Folder Is Nothing Then
MsgBox "The '" & FolderName & "' folder doesn't exist!", _
vbOKOnly + vbExclamation, "Invalid Folder"
End If

Dim Item As Object
For Each Item In Application.ActiveExplorer.Selection
If Item.UnRead Then Item.UnRead = False
Item.Move Folder
Next

Exit Sub

ErrorHandler:
MsgBox Error(Err)

End Sub

Friday, 1 May 2009

Windows Live Messenger 9 on XP 64

A topic completly different: Installing WL9 on XP 64.

You need a tool to extract cab file (7zip do it)

Then download the following cab file, extract the content and install the msi file.


Messenger.msi

http://download.microsoft.com/download/E/B/7/EB7AAFE7-514F-495A-A981-99830FE8E99E/en/Messenger-ship-en.cab

Contact.msi

http://download.microsoft.com/download/E/B/7/EB7AAFE7-514F-495A-A981-99830FE8E99E/en/Contacts-ship-neutral.cab

dw20sharedamd64.msi

http://download.microsoft.com/download/E/B/7/EB7AAFE7-514F-495A-A981-99830FE8E99E/en/Watson-x64.cab

dw20shared.msi

http://download.microsoft.com/download/E/B/7/EB7AAFE7-514F-495A-A981-99830FE8E99E/en/Watson-x86.cab

SegoeFont.msi

http://download.microsoft.com/download/E/B/7/EB7AAFE7-514F-495A-A981-99830FE8E99E/en/SegoeFont.cab

crt.msi

http://download.microsoft.com/download/E/B/7/EB7AAFE7-514F-495A-A981-99830FE8E99E/en/crt-neutral.cab

wlc.msi

http://download.microsoft.com/download/E/B/7/EB7AAFE7-514F-495A-A981-99830FE8E99E/en/wlc-ship-en.cab

Enjoy