ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Not allowing an Excel Worksheet to be opened in Word (https://www.excelbanter.com/excel-programming/288169-not-allowing-excel-worksheet-opened-word.html)

John[_73_]

Not allowing an Excel Worksheet to be opened in Word
 
I have some workbooks that are shared by many users. For some reason, the workbooks are opened in Word. When this happens it plays havic with the shared properties of the workbooks. Is there a way to set these workbooks so they can't be opened by Word? I have tried adding code to the Workbook Open Event, but it is bypassed when opened in Word. Any suggestions?

Jon Peltier[_6_]

Not allowing an Excel Worksheet to be opened in Word
 
How do the users open them in Word? Is there a broken file association?

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

John wrote:

I have some workbooks that are shared by many users. For some reason, the workbooks are opened in Word. When this happens it plays havic with the shared properties of the workbooks. Is there a way to set these workbooks so they can't be opened by Word? I have tried adding code to the Workbook Open Event, but it is bypassed when opened in Word. Any suggestions?



VBA Novice

Not allowing an Excel Worksheet to be opened in Word
 
They start Word and then open the workbook from inside Word. Seems to
me there should be someway to tell the workbook to check to see which
application is opening it and not open if it is not Excel.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jon Peltier[_6_]

Not allowing an Excel Worksheet to be opened in Word
 
Sounds like your users need a little training. I don't think the Excel
WorkBook_Open procedure would even fire if the workbook is opened in Word.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

VBA Novice wrote:

They start Word and then open the workbook from inside Word. Seems to
me there should be someway to tell the workbook to check to see which
application is opening it and not open if it is not Excel.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Jon Peltier[_6_]

Not allowing an Excel Worksheet to be opened in Word
 
After I hit Send, I thought about putting some code into Word's
Normal.dot template.

In Excel, you can set up application events, and capture the opening of
a new file with the WorkbookOpen application event. Then if the filename
ends in something other than ".xls" you could close the file and give
the user a nasty warning.

Word (97, anyway, which is what I have here in the office) does not
offer a DocumentOpen application level event that would close all non
".doc" files. So unless anyone else here has an idea, I think you just
need to keep good backups and start beating up your users.

You might try posting to one of the Word newsgroups....

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

Jon Peltier wrote:

Sounds like your users need a little training. I don't think the Excel
WorkBook_Open procedure would even fire if the workbook is opened in Word.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

VBA Novice wrote:

They start Word and then open the workbook from inside Word. Seems to
me there should be someway to tell the workbook to check to see which
application is opening it and not open if it is not Excel.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





Peter Grebenik[_2_]

Not allowing an Excel Worksheet to be opened in Word
 
In my version of Office2000, if you protect a workbook (not just a
worksheet) with a password, then word is unable to open it.


All times are GMT +1. The time now is 03:36 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com