![]() |
HELP! How to Use VBA to Activate Embedded Word Doc?
I have a sheet with an embedded Word doc in it. When you double-click the
Word icon in the sheet, the doc opens. What I'd really like to do, though, is cover up the icon with a more user-friendly AutoShape that has instructions on it. (You know, "Click here to go to...") I've tried attaching a simple macro to the AutoShape to open the document hidden underneath. (The Word icon is "Object 10"): Sub Activate_Object_Macro() ActiveSheet.Shapes("Object 10").Activate End Sub But I get an error message saying the object doesn't support this method. Then I tried this: Sub Activate_Object_Macro() Application.ActivateMicrosoftApp xlMicrosoftWord ActiveSheet.Shapes("Object 10").Select End Sub But all that that is, well, select the icon--it doesn't open the doc. What am I missing? Of course, if I could just reformat the icon itself to look like what I want, this wouldn't be necessary. Is that possible, either? Please help--I'm supposed to show this thing at a meeting this afternoon! |
HELP! How to Use VBA to Activate Embedded Word Doc?
ADDENDUM: I forgot to mention that the workbook will be used by both PC and
Mac users, so the macro needs to be usable on both platforms. Unfortunately, I think this cancels out any use of ActiveX. "Wuddus" wrote: I have a sheet with an embedded Word doc in it. When you double-click the Word icon in the sheet, the doc opens. What I'd really like to do, though, is cover up the icon with a more user-friendly AutoShape that has instructions on it. (You know, "Click here to go to...") I've tried attaching a simple macro to the AutoShape to open the document hidden underneath. (The Word icon is "Object 10"): Sub Activate_Object_Macro() ActiveSheet.Shapes("Object 10").Activate End Sub But I get an error message saying the object doesn't support this method. Then I tried this: Sub Activate_Object_Macro() Application.ActivateMicrosoftApp xlMicrosoftWord ActiveSheet.Shapes("Object 10").Select End Sub But all that that is, well, select the icon--it doesn't open the doc. What am I missing? Of course, if I could just reformat the icon itself to look like what I want, this wouldn't be necessary. Is that possible, either? Please help--I'm supposed to show this thing at a meeting this afternoon! |
All times are GMT +1. The time now is 02:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com