#1   Report Post  
Junior Member
 
Posts: 4
Unhappy Sdi

Hi there peeps.

I have searched the Internet extensively for a kludge and am close to believing that it is not possible but...

Can Excel be duped into behaving in a SDI manner?

The reason that I ask is to be able to avoid the following situation:

1. I create a workbook but do not save it.
2. I get an e-mail with an xls attachment
3. I open, read and want to close the attachment
4. I click the big X (Its natural behaviour... this works in Word)
5. Excel prompts me about saving some workbook
THIS IS THE DANGEROUS BIT...
Excel is talking about my original workbook
But the damnable software does not bring the workbook
that it is talking about to the front
6. Thinking that Excel is moaning about changes to the attachment,
partly because Excel asks this question all the time, even when
changes have not been made, I click "No"
7. All Excel closes, losing me my work.

I hasten to add that this does not happen to me (OK, it did happen once) but I have two or three users to whom this repeatedly happens... and I have to agree with their frustration...

Is there anything that I can do?

I've tried the "ignore other applications" checkbox - although all this serves to do is stop Excel listening to Windows DDI calls, so it won't open any spreadsheets from Explorer, IE, Outlook, etc...

I've also looked at the "Windows in taskbar" option, which does not help in the slightest.

By default, I have "group similar taskbar items" off in Windows (XP Pro SP2).

I have tried kludging the XLS file association entries in Win Explorer but this serves to muck up the file associations and requires an Excel /unregserver /regserver combo...

So, I have tried turning the "ignore other applications" on and then trying to get Excel to open by adding a %1 to the end of the registry entry that is behind the XLS File association (editing the registry entry does not seem to upset the association where editing the entry from tools options in Windows Explorer does)

However, nothing seems to work... the "ignore other applications" does open separate instances of Excel (but empty ones)...

And I KNOW it is possible because opening multiple instances of Excel and using File Open works... so what can I do to trick Excel? Is there a way of changing the interfering with Excel spotting that it already has an instance open? Is there a way to encourage Excel to open a dbl-clicked XLS file with the "ignore other apps" on? Is there a way of writing an autoexec macro that asks whether this instance has two workbooks open and, if so, closes the second and opens that book in a new instance?

Surely there must be something cunning that can be done?

Please, somebody help me!!!

Thanks,
Andy
  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default Sdi

Yep. Excel and MSWord behave differently.

For me, I still live with one item in the taskbar (like using xl97).
(tools|options|view tab|windows in taskbar unchecked)

That serves as a reminder that I'm closing the single application when I use
that giant application X.


Sniq_e wrote:

Hi there peeps.

I have searched the Internet extensively for a kludge and am close to
believing that it is not possible but...

Can Excel be duped into behaving in a SDI manner?

The reason that I ask is to be able to avoid the following situation:

1. I create a workbook but do not save it.
2. I get an e-mail with an xls attachment
3. I open, read and want to close the attachment
4. I click the big X (Its natural behaviour... this works in Word)
5. Excel prompts me about saving some workbook
THIS IS THE DANGEROUS BIT...
Excel is talking about my original workbook
But the damnable software does not bring the workbook
that it is talking about to the front
6. Thinking that Excel is moaning about changes to the attachment,
partly because Excel asks this question all the time, even when
changes have not been made, I click "No"
7. All Excel closes, losing me my work.

I hasten to add that this does not happen to me (OK, it did happen
once) but I have two or three users to whom this repeatedly happens...
and I have to agree with their frustration...

Is there anything that I can do?

I've tried the "ignore other applications" checkbox - although all this
serves to do is stop Excel listening to Windows DDI calls, so it won't
open any spreadsheets from Explorer, IE, Outlook, etc...

I've also looked at the "Windows in taskbar" option, which does not
help in the slightest.

By default, I have "group similar taskbar items" off in Windows (XP Pro
SP2).

I have tried kludging the XLS file association entries in Win Explorer
but this serves to muck up the file associations and requires an Excel
/unregserver /regserver combo...

So, I have tried turning the "ignore other applications" on and then
trying to get Excel to open by adding a %1 to the end of the registry
entry that is behind the XLS File association (editing the registry
entry does not seem to upset the association where editing the entry
from tools options in Windows Explorer does)

However, nothing seems to work... the "ignore other applications" does
open separate instances of Excel (but empty ones)...

And I KNOW it is possible because opening multiple instances of Excel
and using File Open works... so what can I do to trick Excel? Is there
a way of changing the interfering with Excel spotting that it already
has an instance open? Is there a way to encourage Excel to open a
dbl-clicked XLS file with the "ignore other apps" on? Is there a way
of writing an autoexec macro that asks whether this instance has two
workbooks open and, if so, closes the second and opens that book in a
new instance?

Surely there must be something cunning that can be done?

Please, somebody help me!!!

Thanks,
Andy

--
Sniq_e


--

Dave Peterson
  #3   Report Post  
Junior Member
 
Posts: 4
Unhappy

OK, thanks for the reply, Dave... but I don't want to accept defeat so readily... with Excel set to "ignore other applications",you can still get Excel to run correctly by running a dos prompt, browsing to the [in my case] "c:\program files\microsoft office\office10\" directory and then typing "Excel TARGET.XLS" to open the TARGET file... and, surely, at it's most fundamental level, this is all Windows does when it invokes the default program as a file handler... What I'm trying to drive at is this - if I create myprog.exe and assosiate it with .mpr files then.... I would expect, upon double clicking a test.mpr file for Windows to invoke myprog.exe with the argument test.mpr in an identical way to me typing "myprog test.mpr" at the DOS prompt... and, surely, telling Windows "%1" in the "OPEN" section of the file associations settings box in Windows Explorer ought, by all rights, to do precisely this!!! It seems, though that MS in their infinite wisdom (or infinite desire to cover up the fact that they can't right code for ****), have deliberately setup the office file associations in a different way... as evidenced by the fact that changing the very slightest setting in any office file association setting causes the whole of Office to suddenly misinterperet a space in the filename or path... so... I deduce that MS wrote a bloody aweful kludge to get Office and/or Windows to accept spaces in filenames and, as a result, the file associations have to use a non-standard mechanism to pass the file arguments... although this sounds like an operating system based on DOS, like win 95, but I thought that XP Pro was definitely NOT based on DOS... I am so confused... and I don't understand how Microsoft manage to exist whilst writing such completely inefficient code (except that Intel probably pay they big bucks to write badly...)

Any help would be greatly appreciated... although I am off to associate a .xxx file with excel and see whether I can rename .xls files as .xxx and get Excel to open them in "ignore other applications" mode... then I might need to write an add-in to Excel to get it to properly interperet a XXX file as if it were a XLS file and I should be in business...

Any help/ideas/comments would be greatly appreciated!

Thanks,
Andy

[color=blue]
Dave Peterson
--Yep. Excel and MSWord behave differently.
--For me, I still live with one item in the taskbar (like using xl97).
--(tools|options|view tab|windows in taskbar unchecked)
--That serves as a reminder that I'm closing the single application when I use
--that giant application X.
  #4   Report Post  
Junior Member
 
Posts: 4
Smile

OK, finally, I have a working system (with an unwanted CMD dos box).

I have created a CMD file called test.cmd and put it in the same folder as Excel.exe... this is how mine reads:

echo off
CLS
echo Please feel free to close this window!
cd c:\progra~1\micros~2\office10\
Excel %1

Then, I deleted the XLS association.
Then, I created a new associaton for XLS and a new action, Open...
My entry now reads:

"C:\Program Files\Microsoft Office\Office10\test.cmd" "%1"

Finally, I have enabled the "Ignore other applications" checkbox in Excel's settings... although this can be on or off and it still works.

And now, when I dbl-click on an XLS file (or an xls attachment), Excel opens in a new instance, precisely how I want it to.

The only negative side effect that I have found is that I get a black dos box at the same time (although this can be closed, easily)... I am working on a way to make this disappear.

There is one final warning, if anybody else wants to follow in my footsteps... I do not know if this process will stop Excel functioning correctly in some specific instances (such as being invoked from within a Word document)... so use this method with caution.

So, do I get a medal for being the first person to force Excel to function as an SDI package... or do you all think that this is a useless exercise?

Take care,
Andy
  #5   Report Post  
Junior Member
 
Posts: 4
Thumbs up

Ammendment...
Batch file should read:

echo off
CLS
echo Please feel free to close this window!
c:\progra~1\micros~2\office10\Excel.exe "%~1"

Otherwise Excel will not open automatically on any drive other than c: !!!

Oh, and I have added a strip the inverted commas and put them back because... no, no reason... %1 is just as good as "%~1"

Good like screwing around with the way Windows works!


  #6   Report Post  
icee
 
Posts: n/a
Default Sdi


thanks a lot for your work making excel2003 behave similar to word2003 -
i just didn't find the persistent .cmd-window ideal.
changing the batch file into the 1-liner:

start "" c:\progra~1\micros~2\office11\Excel.exe "%~1"

does the trick for me.

important are
1. the spaces after start and ""
2. omission of " around %~1 makes it impossible to open files with
spaces in the file name


--
icee
------------------------------------------------------------------------
icee's Profile: http://www.hightechtalks.com/m241
View this thread: http://www.hightechtalks.com/t2273863

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 11:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"