Outlook 2013 URL Protocol Handler

Outlook has a custom URL protocol that allows interaction with different elements such as folders, mail and calendar items and contacts, Since Outlook 2007, this has been restricted for use only within Outlook itself but there are some tremendous opportunities for use from simple web systems. This post explains how to turn it on, even for Outlook 2013 (Office 365 version). It also gives pointers to other articles on how to use the protocol.

One of the nice features about older versions of Microsoft Outlook was that it had a set of URL Protocol Handlers (like outlook:inbox) defined that could be used system wide to trigger actions in Outlook such as opening a folder, creating or editing an item.

Unfortunately, along the way, these got gradually toned down so that they only worked from within Outlook itself.

This can still be useful. I’m not sure how many people realise that you can create “folders” in your Outlook mailbox. Choose Properties .../Home Page and set a URL – maybe your blog or Intranet. Now when you click on the folder, you will see the web page instead of a set of mail items or whatever.

When using this feature to do some more clever stuff such as creating To Do lists from incoming mail, you might choose to use a dynamic web system to handle the list. CouchDB or Node.JS are lightweight web systems that come to mind.

Then you might find yourself wishing that you could create links in your To Do system back to the original email in Outlook. Well you can! Sort of.

It turns out that, although the external use of the Outlook: protocol hasn’t been available since Outlook 2003, it can still be turned on, even in Outlook 2013. There is a useful article on the TeamScope web site that shows you how to turn on the outlook: protocol system-wide.

One minor wrinkle though if you use Office from an Office 365 subscription – the location for Microsoft Office applications is different! You will find them at: C:\Program Files\Microsoft Office 15\root\office15.

Here then is the registry code that you need to enable the protocol:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\outlook]
"URL Protocol"=""
@="URL:Outlook Folders"

[HKEY_CLASSES_ROOT\outlook\DefaultIcon]
@="\"C:\\Program Files\\Microsoft Office 15\\root\\office15\\OUTLOOK.EXE\""

[HKEY_CLASSES_ROOT\outlook\shell]
@="open"

[HKEY_CLASSES_ROOT\outlook\shell\open]
@=""

[HKEY_CLASSES_ROOT\outlook\shell\open\command]
@="\"C:\\Program Files\\Microsoft Office 15\\root\\office15\\OUTLOOK.EXE\" /select \"%1\""

Simply save this into a .reg file and open it to install the changes.

Now you can use the outlook: protocol anywhere on the system, great for dynamic web systems.

One minor word of warning though – there are dangers! Don’t open links unless you know what they are, where they go and what they do!

To find out how to use the Outlook protocol handler, try one of the following articles:

One final note. I’m now looking to create some tools that link between Outlook and CouchDB. CouchDB provides a very lightweight NOSQL database that uses JSON and JavaScript to great effect. I’m already using it to track statistics on incoming/outgoing emails, linking the web interface back to Outlook via the home page method mentioned at the start. I’m going to have a go at creating a task monitor too if I get the time. I am currently reading only around a quarter of the emails in my work inbox and I really need some tools to improve the situation. Food for some more blog posts hopefully.

Microsoft 64-bit Application Support (lack-of)

Microsoft’s 64-bit support is still sorely fragmented as we find out with a brand new laptop trying to access Microsoft SharePoint.

The joys of working with Microsoft products!

So I have a brand-new, shiny 17″ HP laptop. 64-bit throughout. 6GB of RAM and comes pre-installed with 64-bit Windows.

You would think, then, that you would want to use 64-bit applications right? Wrong!!

I automatically use the 64-bit version of Internet Explorer to access some Microsoft specific sites (Outlook Web Access and SharePoint 2007). I install and use the 64-bit version of Microsoft Office. Does this work well with SharePoint (from Microsoft)? No!

For starters, you cannot upload an Excel spreadsheet to a SharePoint list like you should be able to. You get an error:

This feature requires Microsoft Internet Explorer version 5.0 or later, and Windows 95 or later.

Next you try to switch a list into a “Datasheet” view – which looks a bit like a spreadsheet. Inevitably, you get another error:

The list is displayed in Standard view. It cannot be displayed in Datasheet view for one or more of the following reasons: A datasheet component compatible with Windows SharePoint Services is not installed, your browser does not support ActiveX controls, or support for ActiveX controls is disabled.

To fix these errors, you then have to download and install “2007 Office System Driver: Data Connectivity Components“.

And you have to use the 32-bit version of Internet Explorer 9 (IE9).

Low-cost Information Management, Communications and Collaberation Tools

Although much of the work I do is for very large organisations and extremely costly projects, being an adopted Yorkshire-man, I’ve always an eye open for a bargain! More seriously, there are many small to medium sized businesses and charities that cannot afford big IT budgets but that still are crying out for good information management, communications and collaboration tools. In this article, I’ve tried to highlight a few tools that I think are worth looking at.

I’ve not included anything in this article that requires a monthly or annual cost. All the tools here are available for free at least with limited features. The feature lists given are for the free versions with paid-for key features noted where appropriate. I also note if any of the web sites are blocked by typical enterprise firewalls.

There is a lot more than what I’ve shared here, I’ll try to update this article from time-to-time. Continue reading “Low-cost Information Management, Communications and Collaberation Tools”

Microsoft Word Wildcard and Regular Expression Search and Replace

One often missed aspect of the Find dialog in Microsoft Word is the ability to use wild cards.

In fact, Word not only has the simple wild cards (* and ?) but uses simplified Regular Expression (REGEX) searching.

In this article, I’ve put together a number of examples of advanced finds and replaces that I’ve found useful. I’ll update it from time to time. Continue reading “Microsoft Word Wildcard and Regular Expression Search and Replace”

Microsoft’s Facebook Docs.com fails at the first hurdle

Had my first test for Microsoft’s new docs.com this week – and it failed badly.

In case you don’t know, Microsoft recently announced a new beta Office Live link-up with Facebook. You can log in using your Facebook login instead of a Microsoft Live Id.

So you would think that it would be possible to use docs.com as a collaborative document editor and I suspect that you are supposed to be able to – as long as your documents don’t contain anything complex – such as comments!

My wife wanted to share a spreadsheet with some friends – very simple – just a few lines to help them schedule some transport for the kids during an upcoming dance show. Docs.com seemed ideal for this as they are all on Facebook so it should be much easier than using Google docs.

  • The first problem is that docs.com doesn’t always pick up your existing Facebook login so you have to log in again.
  • The second problem is that even when you are logged in, there is a large banner asking you to sign up for the Beta programme – very confusing.
  • The third problem is that the interface does not work correctly with Firefox – there is no warning of this but there are some things, such as adding viewers and editors, that fail with no proper explanatory error message.
  • The fourth problem is that only the original creator can add other editors or viewers, there is no way of delegating this.
  • The fifth, and most serious, problem comes from using cell comments to annotate cells. Apparently Microsoft’s shiny new online Office suite cannot cope with this. Not only does it not show them on the web page, it will no longer let you edit the spreadsheet online! To compound the problem, when someone else (who has been given edit rights) then downloads the sheet as instructed – there is no way to get the edited sheet back online!!

OUCH – it is, in fact, much easier to simply email the document back and forth.

Of course, we could have used Google docs for this. In fact, Google docs seems to have much better compatibility with Microsoft Office than Microsoft do!! It had no problem with cell comments. You can also set the document to not require a login, handy as many people don’t have Google logins. But by this time, the audience had lost patience with the technology and done things a different way.

It may only be in Beta but Microsoft seem to be determined to demonstrate that they don’t understand user interactions in a collaborative sense nor do they have any comprehension it seems for the need for simplicity. 1 out of 10 for docs.com then – must try better!

UPDATE 2010-06-18: Tried again, this time with Google docs. I set the document so that anyone can edit it (without needing a Google login), shared the link using Facebook messages and everyone is happy. You can even work on the document together, you actually see other people updating the document. Given that it also supports more useful features than docs.com, Google docs gets the thumbs up – 10/10

PS: Sorry about comments, I’ve updated the Blogger theme and it seems to have broken the old comments. If you are desperate to get in touch, feel free to use my comment form. I’ll put any comments on here manually.

Nearest Postcode Search in Microsoft Excel

I need to find a load of addresses by proximity to a postcode. I have the addresses in a Microsoft Access database.

  1. Download Paul Jenkins’s UK Postcode csv and import into Access as a table
  2. Create a query on your own table adding the following calculated field:
    <pre>PCregion: Trim( Left( [My Table]![Postcode], InStr( [My Table]![Postcode], ” ” ) ) )</pre>
  3. Create a second query that joins the above query to the imported postcode table. Join on the “PCregion” field created above. Also add in the latitude and longitude fields from the postcodes table

Well, I couldn’t be bothered to fight with Access so I exported the key tables and used Excel instead!

The principals are the same. Load the tables as tabs, load the Postcode data as a tab. Create a front sheet containing the reference Postcode (Create a Named Cell for this “STARTREGION”). Translate the reference Postcode to Latitude and Longitude by doing a VLOOKUP to the Postcode table, e.g.:

=VLOOKUP(TRIM(LEFT(RC2,SEARCH(" ",RC2 & " "))),UK_PostCodes!C1:C4,3,FALSE)

Where RC2 contains the reference Postcode and “UK_PostCodes!C1:C4” is the postcodes table (column 3 contains the Latitude and 4 the Longitude). Note that I’ve used R1C1 reference style as it is easier to mix fixed and relative references.

Now use the same formula in the main data tables so that you have Lat. and Long. columns added based on the Postcode on each line.

Finally add a “Distance” column to each data table with the following formula:

=ROUND(DEGREES(ACOS(SIN(RADIANS(STARTLAT))*SIN(RADIANS(RC28))+COS(RADIANS(STARTLAT))*COS(RADIANS(RC28))*COS(RADIANS(STARTLON-RC29))))*60*1.1515,0)

In this case, we’ve used the STARTREGION named cell and the Lat./Long. data is in columns 28 & 29 respectively.

The calculation and Postcode reference data came from HM2K’s website: How to search by nearest uk postcode in php.

Copy and Paste to OneNote (AutoHotKey script)

After yesterdays OneNote tool, I thought I’d do another while I think about it.

Another annoyance of OneNote is it’s lack of control over pasting information from the clipboard. I’ve raised a suggestion with MS to improve this; you can see my comment in the newsgroup.

To ease things a little if you need to copy and paste lots of stuff to OneNote, here is an AutoHotKey script to help. You need to assign this to a hot-key and have OneNote open in the background. Select something and press the hot-key and it will be pasted (using the current default paste option as this cannot be controlled) into the current note in OneNote.

; AutoHotKey Script to copy pre-selected stuff from the currently active window
; to the currently open note in OneNote
;
; Usage: #include in your main AutoHotKey.ahk assigned to a hot key
; Limitations: 
;       1) OneNote must be open - maybe change this in the future so that content goes to a new unfiled note
;       2) Doesn't swap back to original application
;
; Author: Julian Knight, http://www.knightnet.org.uk/contact.htm
; Version: 2009-04-01 v1.0

; We need a partial title match but we will also reset to previous setting
oldTitleMatchMode := A_TitleMatchMode
SetTitleMatchMode, 2

; Settings
winTitlePart := " - Microsoft Office OneNote"   ; Partial title of ON windows

; Copy currently selected stuff
SendPlay, ^c                    ; Use sendplay to avoid unexpected interactions with Win key

; If OneNote is not started, give up
IfWinExist, %winTitlePart%
{
        ; Save the currently active window title
        WinGetTitle, actWin, A
        
        ; If OneNote is not active, activate it now
        IfWinNotActive, %winTitlePart%
                WinActivate, %winTitlePart%

        ; Check again, if ON active then paste else error
        IfWinActive, %winTitlePart%     
        {
                ; Paste to ON &amp; Add some blank lines
                SendPlay, ^v`r                  ; Use sendplay to avoid unexpected interactions with Win key
                ; Switch window back to previously active
                WinActivate, %actWin%
        }
        else
                MsgBox, Could not activate OneNote window.
                
} else
        MsgBox, Can't find ON [%winTitlePart%]

SetTitleMatchMode, %oldTitleMatchMode%
return


Technorati : , , , , , ,
Diigo Tag Search : , , , , , ,

Setting list item gaps in Microsoft OneNote (AutoHotKey script)

Although I like Microsoft OneNote and use it continuously, it does have a few failings. One of these is the inability to set the default styles and layout for text.

In particular, when you create a new paragraph or list entry in OneNote, the default – non-changeable – setting is to have no white space between the paragraphs.

This is very poor design and makes more than a small amount of text quite unreadable. I’ve raised this with Microsoft but who knows if or when it might be sorted.

In the mean time, I need a far quicker way of changing this. Currently, I’ve had to:

  1. Select the container with the text I want to format
  2. Use the menu to show the List Task Pane ([alt]o/L)
  3. Mouse click on the text box to change (you cannot tab into it)
  4. Change the 0.00 pt default to something like the 6.00 pt that I prefer
  5. Close the List Task Pane

Not nice!

Having determined that there is nothing clever that can be done in OneNote, I decided that the old standy “AutoHotKey” would be useful. So I’ve created a script for AutoHotKey that will change the inter-list gap for the currently selected container.

; [win]-z Set OneNote list to 6pt separation
#z::
; We need a partial title match but we will also reset to previous setting
oldTitleMatchMode := A_TitleMatchMode
SetTitleMatchMode, 2

debug            := 1                                                           ; Set to 1 to output debug messages, or 0
winTitlePart := " - Microsoft Office OneNote"   ; Partial title of ON windows
winText          := "List"                                                      ; Text to identify List Task Pane - Visible Window Text: MsoDockRight, Task Pane, List
listDefault      := "0.00 pt"                                           ; The default setting for list separation between items
listNew          := "6.00 pt"                                           ; My desired spacing between list items

; Only do something if ON is the active window
IfWinActive, %winTitlePart%
{
        ; We need the List Task Pane to be visible
        IfWinNotExist, %winTitlePart%, %winText%
        {
                ;IfEqual, debug, 1, MsgBox List not active
                ; Send chars to activate menu, can't use WinMenuSelectItem with Office apps
                ;   SendPlay is used to prevent the Windows key locking the PC (Win+L)
                SendPlay, !oL
        }
        ; List Task Pane should now be visible, save the existing setting
        ControlGetText, Var1 , RichEdit20W2, %winTitlePart%, %winText%
        ; If the current setting is the default setting then make the change
        if Var1 = %listDefault%
        {
                ; Focus on the input box &amp; set the text
                ControlFocus, RichEdit20W2, %winTitlePart%, %winText%
                ControlSetText, RichEdit20W2, %listNew%, %winTitlePart%, %winText%
                ; This is optional to check if we were successful
                ControlGetText, Var2 , RichEdit20W2, %winTitlePart%, %winText%
                if ErrorLevel   ; i.e. it's not blank or zero then error
                        MsgBox, %Var1% - %Var2% - Problem - %ErrorLevel%.
                else
                        IfEqual, debug, 1, MsgBox, OK - %Var1% - %Var2%.
        }
        ; Close the List Task Pane (actually it closes the Task Pane, period, sorry)
        SendPlay, ^{F1}
}
else    ; ON not active so do nothing
        IfEqual, debug, 1, MsgBox, OneNote not active

SetTitleMatchMode, %oldTitleMatchMode%
return

OK, so it’s a bit rough-and-ready but it does save a whole lot of time. I’ve got this in my default AHK script so it is loaded whenever I log in and is activated with [win]z.


Technorati : , , , , , ,
Diigo Tag Search : , , , , , ,

Critical Bug in Outlook 2007

I’ve recently stumbled on a bug in Outlook 2007. Apparently it is quite well known and the only reason that I hadn’t found it was that I don’t use Outlook as my main email client. In fact I only use email on it to handle meeting requests.

The bug is that Outlook 2007 ignores the setting regarding sending reply requests for IMAP accounts.

If this seems rather irrellivant to you, you might want to think again.

If you have an email account that receives SPAM and you access it via IMAP, Outlook 2007 will ignore your setting for reply requests (the setting is defaulted to prompt). Since many SPAM emails have reply requested turned on, you will suddenly find that Outlook is trying to send a whole load of email messages that do not appear in any folder! You haven’t been asked, it is just doing it.

This is bad enough as you are now leaking information about your account out onto the Internet – but it gets worse!

Outlook does not send the replies out using the account that recieved the SPAM, it sends them out from the DEFAULT account.

So if you have, lets say for example, a work account that doesn’t recieve significant SPAM and is your default account in Outlook. Then you have a second, personal account perhaps, that does recieve significant SPAM. You will suddenly find that Outlook is sending hidden emails from your work account – these are the reply responses from your personal account. Now you are leaking information about your work account.

Now, there is a new, big update to Outlook 2007 that has just been released. It is not yet on Windows Update but Microsoft are touting it as the biggest and best set of updates for Outlook ever – see Jimmy May’s blog post for more information. Sadly though, despite the hype, the new update does not fix this critical bug.

The update – which will be part of the Service Pack 2 (SP2) for Office 2007 – certainly does vastly speed up the operation of Outlook 2007 so there is some good news.


Technorati : , , , , ,
Diigo Tag Search : , , , , ,