unable to 'open with'

User avatar
stuck
Panoramic Lounger
Posts: 8128
Joined: 25 Jan 2010, 09:09
Location: retirement

unable to 'open with'

Post by stuck »

If I:
    browse to a .txt file in Explorer
    RIGHT click
    choose ‘Open with’
then, as expected Excel, is neither one of the recommended programs nor is it listed under ‘Other Programs’. So far, so normal.

If then proceed and:
    untick ‘Always use the selected program to open this kind of file’
    click the Browse button
    navigate to C:\Program Files (x86)\Microsoft Office\root\Office16
    choose EXCEL.EXE
    click Open
then nothing happens.

I suspect this problem is tied up with the rather messy way that I was upgraded from Office 2010 to Office 2106, which has left an unholy jumble of ‘old’ office folders on my PC both under (the 64 bit) \Program Files:
    \Microsoft Office 15
    \Microsoft Office 15.old
    \Microsoft Office.old
and under (the 32 bit) \Program Files (x86):
    \Microsoft Office.old
Given that, perhaps it’s not surprising that Explorer on my PC can’t make whatever sort of file association it needs to make in order get the above sequence to work the way it should.

Any suggestions?

Ken

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: unable to 'open with'

Post by HansV »

Since you point to the correct path for Excel 2016, it shouldn't matter that there are other, old Office folders. Windows should simply start the application and tell it to open the file.

When I follow your steps (in Windows 10), the text file is opened in Excel, but Excel doesn't get the focus, so it seems like nothing has happened. Switching to Excel reveals that the file has actually been opened. Are you sure that doesn't happen on your computer?
Best wishes,
Hans

User avatar
stuck
Panoramic Lounger
Posts: 8128
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: unable to 'open with'

Post by stuck »

HansV wrote:...Are you sure that doesn't happen on your computer?
I'm sure nothing happens. I've tried it with Task Manager running too. Nothing shows up at any point on either the 'Applications' or the 'Processes' tabs.

It all works as expected on the PC on the desk next to me so this is something peculiar to my PC.

Ken

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: unable to 'open with'

Post by HansV »

Do you have Excel pinned to the taskbar? If not try doing that - I found a suggestion that this may help.
Best wishes,
Hans

User avatar
stuck
Panoramic Lounger
Posts: 8128
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: unable to 'open with'

Post by stuck »

I don't have anything pinned to the taskbar as pinned items prevent the task bar auto-hiding. All my frequent apps are on my Quick Launch toolbar. However, having tried the suggestion it didn't help :sad:

I've also tried a restart and now despite selecting EXCEL.EXE the file opens in Notepad.

I'll leave this for now. It's not often I need to open a .txt file with Excel and I can do it via Excel's File | Open.

Thanks for your ideas.

Ken

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: unable to 'open with'

Post by HansV »

Another way you can try: drag a .txt file from Windows Explorer into an Excel window. This should open the file in Excel.
Best wishes,
Hans

User avatar
DaveA
GoldLounger
Posts: 2599
Joined: 24 Jan 2010, 15:26
Location: Olympia, WA

Re: unable to 'open with'

Post by DaveA »

One silly question, why would any one want to open a TXT file with Excel?

I know that some TXT files can be imported into Excel, I was taught to import, one must always open Excel and then import.
I am so far behind, I think I am First :evilgrin:
Genealogy....confusing the dead and annoying the living

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: unable to 'open with'

Post by HansV »

If the text file represents a single column of data, or if it is tab-delimited, it is perfectly reasonable to open it directly instead of importing it.
Best wishes,
Hans

User avatar
DaveA
GoldLounger
Posts: 2599
Joined: 24 Jan 2010, 15:26
Location: Olympia, WA

Re: unable to 'open with'

Post by DaveA »

OK, that is what I thought was happening, but I sure would NOT want Excel to be the default for TXT files.
I am so far behind, I think I am First :evilgrin:
Genealogy....confusing the dead and annoying the living

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: unable to 'open with'

Post by HansV »

Ken unticked ‘Always use the selected program to open this kind of file’, so he wasn't making Excel the default program for text files.
Best wishes,
Hans

User avatar
stuck
Panoramic Lounger
Posts: 8128
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: unable to 'open with'

Post by stuck »

I wouldn't want Excel to be the default for .txt files either but some of the .txt files I use at work are actually CSV files and so it's handy to have to option to Right Click and Open with Excel. This worked fine on my Win 7 machine when I had Office 2010 but for lots of reasons the upgrade to 2016 was messy and now I can't get Explorer to behave the way it used to.

I still think it's something to do with the file associations. Perhaps there's something in in the registry that, despite me explicitly browsing to and choosing the Excel 2016 executable, is still directing Windows to invoke Excel 2010 in this context. Since Excel 2010 isn't there, nothing happens.

I'll get our IT people to have a poke around. There's always the nuclear option of them re-imaging the PC. Drastic but I would have a clean slate to work with and it wouldn't take long for me to restore all my personalisations.

Thanks,

Ken

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: unable to 'open with'

Post by HansV »

Are you allowed to edit the registry yourself? All this file association stuff is stored in the registry...
Best wishes,
Hans

User avatar
stuck
Panoramic Lounger
Posts: 8128
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: unable to 'open with'

Post by stuck »

HansV wrote:Are you allowed to edit the registry yourself?...
I was but then IT found out I could. One of them was watching me as showed him how to make a whole bunch of Word Option settings in one go by by merging a .reg file. He expected the merge to fail but when it worked he went, "What? You're not supposed to be able to do that." In light of this, I don't suppose it will be long before I can't :grin:

Ken

PJ_in_FL
5StarLounger
Posts: 1090
Joined: 21 Jan 2011, 16:51
Location: Florida

Re: unable to 'open with'

Post by PJ_in_FL »

An option to consider is dropping a shortcut to the EXCEL program into the SendTo folder in "C:\Users\{username}\SendTo", which is really a link to the subdirectory "C:\Users\{username}\AppData\Roaming\Microsoft\Windows\SendTo" in Windows 7.

Works to open text files with no muss, no fuss! :smile:

And if you find the SendTo option useful, you may find removing the list of drives at the end of the SendTo list useful as they are a bit annoying, or at least unnecessary and slows down SendTo. If so, you'll want to edit the registry while you still can to fix that, too:

Remove Drive Letters from Send-To menu in Windows 7
PJ in (usually sunny) FL

User avatar
stuck
Panoramic Lounger
Posts: 8128
Joined: 25 Jan 2010, 09:09
Location: retirement

Re: unable to 'open with'

Post by stuck »

It looks like I've fixed my problem. Google pointed me to this post:
https://superuser.com/questions/577109/ ... -windows-7
That was enough to direct me to this key:
HKEY_CLASSES_ROOT\Applications\EXCEL.EXE\shell\open\command\(Default)
and sure enough the path within (Default) was not pointing to the correct location for excel.exe. Having changed that path to where excel.exe is, i.e. to this location:
C:\Program Files (x86)\Microsoft Office\root\Office16
Excel works as expected when using the right click open with context menu.

Ken

User avatar
HansV
Administrator
Posts: 78238
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: unable to 'open with'

Post by HansV »

Thanks for the feedback.
Best wishes,
Hans