When you attempt to open an Exchange Server Public Folder using a .xnk shortcut you receive the following Error:
Cannot Open File
This is due to tighter security in Outlook 2007.
Workaround
If you need to open xnk shortcut files, you can create a link association between the .xnk file name extension and Outlook 2007.
- Open Windows Explorer (My Comuter).
- On the Tools menu, click Folder Options.
- In the Folder Options dialog, switch to the File Types tab, and then click New.
- In the Create New Extensions dialog box, type xnk in the File Extension box, and then click OK.
- Click to select XNK under Registered file types, and then click Advanced.
- In the Edit File Type dialog box, type XNK next to the icon, and then click New.
- In the New Action dialog box, type OPEN for Action, and then type the following text under Application used to perform action (use the correct path to Outlook for your version of Office).
"C:\Program Files\Microsoft Office\OFFICE12\Outlook.exe" /x "%1"
Note: if Outlook is not installed in the default path, use the correct path to outlook.exe.
- Click OK and exit the dialog.
As a security measure, you should only open .xnk files (and other attachments) that are given to you by a trusted source.
Create XNK association in Windows 7/8
Windows 7 or 8 does not include a file type editor. You can change the shortcut association by following these steps:
1. Right click on the file in Windows Explorer and choose Properties, then Change.
2. Browse for and select Outlook.exe (it's usually at C:\Program Files\Microsoft Office\Office12 for Outlook 2007 in 32-bit Windows).
When you click Ok to exit the dialog, it will create these 3 registry keys:
HKEY_CURRENT_USER\Software\Classes\.xnk
HKEY_CURRENT_USER\Software\Classes\xnk_auto_file\shell\open\command
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xnk
It will automatically duplicate the keys to HKCR:
HKEY_CLASSES_ROOT\.xnk
HKEY_CLASSES_ROOT\xnk_auto_file\shell\open\command.
3. Hold the Windows key and press R to open the Run command then type regedit in the Open field and press Enter to open the registry editor.
4. Browse to the following key, right click on it and choose Modify
HKEY_CURRENT_USER\Software\Classes\xnk_auto_file\shell\open\command
5. Edit the path to Outlook.exe to include the /x switch. The "%1" should be created automatically; if not add it too.
The path under HKEY_CLASSES_ROOT\xnk_auto_file will be updated automatically when you add the /x switch to the HKEY_CURRENT_USER keys.
Note that this solution applies to the current Windows user account only, not local machine, and the registry needs to be changed for each user of a computer. (You can't change it for the local machine).
Do it for me
The following registry files will create the HKEY_CURRENT_USER keys for Outlook 2007. The HKEY_CLASSES_ROOT keys should be created automatically. Choose the correct file for your version of Windows, download it and double click to run.
Outlook 2007: XNK keys for Win7/8 32 bit XNK keys for Win7/8 64 bit
More Information
Error message when you try to open a link that has an .xnk file name extension in Outlook 2007: âCannot open fileâ
Why would you not include an example for a complicated registry hack like this one?
Here is what your response should say...
Right click the key and select MODIFY. In the resulting window, modify the existing line to read "C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE\" /x "%1". For Windows 64 bit, the line will look a little different but the changes are the same: "C:\Program Files (x86)\Microsoft Office\Office12\OUTLOOK.EXE\" /x "%1"
I have the examples there... although I see WordPress's wonderful ability to screen up code munged it. :(