• Outlook User
  • New Outlook app
  • Outlook.com
  • Outlook Mac
  • Outlook & iCloud
  • Developer
  • Microsoft 365 Admin
    • Common Problems
    • Microsoft 365
    • Outlook BCM
    • Utilities & Addins

.XNK Extension Error: "Cannot Open File"

Slipstick Systems

› Problems › .XNK Extension Error: “Cannot Open File”

Last reviewed on February 15, 2021     2 Comments

Applies to: Outlook 2007, Outlook 2010

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.

  1. Open Windows Explorer (My Comuter).
  2. On the Tools menu, click Folder Options.
  3. In the Folder Options dialog, switch to the File Types tab, and then click New.
  4. In the Create New Extensions dialog box, type xnk in the File Extension box, and then click OK.
  5. Click to select XNK under Registered file types, and then click Advanced.
  6. In the Edit File Type dialog box, type XNK next to the icon, and then click New.
  7. 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.

  8. Click OK and exit the dialog.

Edit registry to add support for XNK files

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.

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).

Browse for Outlook.exe

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

Edit the registry

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”

.XNK Extension Error: "Cannot Open File" was last modified: February 15th, 2021 by Diane Poremsky

Related Posts:

  • Restore (or Hide) the Open Save Dialog
  • Disable the Unsafe Hyperlink Warning when Opening Attachments
  • Open .eml Files in Outlook
  • Outlook Windows Store Registry

About Diane Poremsky

A Microsoft Outlook Most Valuable Professional (MVP) since 1999, Diane is the author of several books, including Outlook 2013 Absolute Beginners Book. She also created video training CDs and online training classes for Microsoft Outlook. You can find her helping people online in Outlook Forums as well as in the Microsoft Answers and TechNet forums.

Subscribe
Notify of
2 Comments
newest
oldest most voted
Inline Feedbacks
View all comments

Dana
October 18, 2013 4:59 am

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"

1
0
Reply
Diane Poremsky
Reply to  Dana
October 18, 2013 9:05 am

I have the examples there... although I see WordPress's wonderful ability to screen up code munged it. :(

1
0
Reply

Visit Slipstick Forums.
What's New at Slipstick.com

Latest EMO: Vol. 30 Issue 32

Subscribe to Exchange Messaging Outlook






Support Services

Do you need help setting up Outlook, moving your email to a new computer, migrating or configuring Office 365, or just need some one-on-one assistance?

Our Sponsors

CompanionLink
ReliefJet
  • Popular
  • Latest
  • Week Month All
  • Jetpack plugin with Stats module needs to be enabled.
  • Move Deleted Items to Another Folder Automatically
  • Open Outlook Templates using PowerShell
  • Count and List Folders in Classic Outlook
  • Google Workspace and Outlook with POP Mail
  • Import EML Files into New Outlook
  • Opening PST files in New Outlook
  • New Outlook: Show To, CC, BCC in Replies
  • Insert Word Document into Email using VBA
  • Delete Empty Folders using PowerShell
  • Warn Before Deleting a Contact
Ajax spinner

Recent Bugs List

Microsoft keeps a running list of issues affecting recently released updates at Fixes or workarounds for recent issues in classic Outlook (Windows).

For new Outlook for Windows: Fixes or workarounds for recent issues in new Outlook for Windows .

Outlook for Mac Recent issues: Fixes or workarounds for recent issues in Outlook for Mac

Outlook.com Recent issues: Fixes or workarounds for recent issues on Outlook.com

Office Update History

Update history for supported Office versions is at Update history for Office

Outlook Suggestions and Feedback

Outlook Feedback covers Outlook as an email client, including Outlook Android, iOS, Mac, and Windows clients, as well as the browser extension (PWA) and Outlook on the web.

Outlook (new) Feedback. Use this for feedback and suggestions for Outlook (new).

Use Outlook.com Feedback for suggestions or feedback about Outlook.com accounts.

Other Microsoft 365 applications and services




New Outlook Articles

Move Deleted Items to Another Folder Automatically

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Google Workspace and Outlook with POP Mail

Import EML Files into New Outlook

Opening PST files in New Outlook

New Outlook: Show To, CC, BCC in Replies

Insert Word Document into Email using VBA

Delete Empty Folders using PowerShell

Warn Before Deleting a Contact

Newest Code Samples

Open Outlook Templates using PowerShell

Count and List Folders in Classic Outlook

Insert Word Document into Email using VBA

Warn Before Deleting a Contact

Use PowerShell to Delete Attachments

Remove RE:, FWD:, and Other Prefixes from Subject Line

Change the Mailing Address Using PowerShell

Categorize @Mentioned Messages

Send an Email When You Open Outlook

Delete Old Calendar Events using VBA

Repair PST

Convert an OST to PST

Repair damaged PST file

Repair large PST File

Remove password from PST

Merge Two Data Files

Sync & Share Outlook Data

  • Share Calendar & Contacts
  • Synchronize two computers
  • Sync Calendar and Contacts Using Outlook.com
  • Sync Outlook & Android Devices
  • Sync Google Calendar with Outlook
  • Access Folders in Other Users Mailboxes

Diane Poremsky [Outlook MVP]

Make a donation

Mail Tools

Sending and Retrieval Tools

Mass Mail Tools

Compose Tools

Duplicate Remover Tools

Mail Tools for Outlook

Online Services

Calendar Tools

Schedule Management

Calendar Printing Tools

Calendar Reminder Tools

Calendar Dates & Data

Time and Billing Tools

Meeting Productivity Tools

Duplicate Remover Tools

Productivity

Productivity Tools

Automatic Message Processing Tools

Special Function Automatic Processing Tools

Housekeeping and Message Management

Task Tools

Project and Business Management Tools

Choosing the Folder to Save a Sent Message In

Run Rules on messages after reading

Help & Suggestions

Submit Outlook Feature Requests

Slipstick Support Services

Buy Microsoft 365 Office Software and Services

Visit Slipstick Forums.

What's New at Slipstick.com

Home | Outlook User | Exchange Administrator | Office 365 | Outlook.com | Outlook Developer
Outlook for Mac | Common Problems | Utilities & Addins | Tutorials
Outlook & iCloud Issues | Outlook Apps
EMO Archives | About Slipstick | Slipstick Forums
Submit New or Updated Outlook and Exchange Server Utilities

Send comments using our Feedback page
Copyright © 2025 Slipstick Systems. All rights reserved.
Slipstick Systems is not affiliated with Microsoft Corporation.

:wpds_smile::wpds_grin::wpds_wink::wpds_mrgreen::wpds_neutral::wpds_twisted::wpds_arrow::wpds_shock::wpds_unamused::wpds_cool::wpds_evil::wpds_oops::wpds_razz::wpds_roll::wpds_cry::wpds_eek::wpds_lol::wpds_mad::wpds_sad::wpds_exclamation::wpds_question::wpds_idea::wpds_hmm::wpds_beg::wpds_whew::wpds_chuckle::wpds_silly::wpds_envy::wpds_shutmouth:
wpDiscuz

Sign up for Exchange Messaging Outlook

Our weekly Outlook & Exchange newsletter (bi-weekly during the summer)






Please note: If you subscribed to Exchange Messaging Outlook before August 2019, please re-subscribe.

Never see this message again.

You are going to send email to

Move Comment