ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Control Excel from Word (https://www.excelbanter.com/excel-programming/394021-control-excel-word.html)

ryguy7272

Control Excel from Word
 
In a newly created Word document, I created a reference to €˜Normal under
Tools References Normal. I was experimenting with a few different
techniques to use Word to open an Excel file. I got the macro working, but
now I can no longer use Ctrl+C to copy text!! I tried to end the reference
to Normal and I tried to remove the VBA module€¦nothing seems to work!! This
probably wouldnt be a problem at all, except for the fact that all every
single word.doc seems to be affected by this macro. My question is a
two-parter:

Does anyone have any suggestions as to how to end the Ctrl+C problem, and
just basically restore my word documents to the way they were before.

Also, does anyone have any suggestions as to how to open an Excel file from
a Word document? I tried things such as Insert Hyperlink, and Insert
Object. None of these things worked. What I really want to do is simply
open an Excel file on a network drive. I dont want to import the data from
the Excel file into my Word document.


Cordially,
Ryan---

PS, sorry if this posts twice; I didn't see it show up in the list even
though I could swear that I posted it earlier this morning... Also, sorry
for posting on the Word DG and now the Excel DG, but I didn't get a response
on the other DG.
--
RyGuy
--
RyGuy

John Bundy

Control Excel from Word
 
Not sure about your ctl-C issue, but I can tell you how to open Excel
Dim ExcelSheet As Object
Set ExcelSheet = CreateObject("Excel.Sheet")
ExcelSheet.Application.Visible = True

if you type createobject in your helpbar MS returns some nice instructions
on working with this
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"ryguy7272" wrote:

In a newly created Word document, I created a reference to €˜Normal under
Tools References Normal. I was experimenting with a few different
techniques to use Word to open an Excel file. I got the macro working, but
now I can no longer use Ctrl+C to copy text!! I tried to end the reference
to Normal and I tried to remove the VBA module€¦nothing seems to work!! This
probably wouldnt be a problem at all, except for the fact that all every
single word.doc seems to be affected by this macro. My question is a
two-parter:

Does anyone have any suggestions as to how to end the Ctrl+C problem, and
just basically restore my word documents to the way they were before.

Also, does anyone have any suggestions as to how to open an Excel file from
a Word document? I tried things such as Insert Hyperlink, and Insert
Object. None of these things worked. What I really want to do is simply
open an Excel file on a network drive. I dont want to import the data from
the Excel file into my Word document.


Cordially,
Ryan---

PS, sorry if this posts twice; I didn't see it show up in the list even
though I could swear that I posted it earlier this morning... Also, sorry
for posting on the Word DG and now the Excel DG, but I didn't get a response
on the other DG.
--
RyGuy
--
RyGuy


ryguy7272

Control Excel from Word
 
I found the cause fo the problem:
Tools Customize Keyboard Current Keys Remove

Thanks for the code John.

--
RyGuy


"John Bundy" wrote:

Not sure about your ctl-C issue, but I can tell you how to open Excel
Dim ExcelSheet As Object
Set ExcelSheet = CreateObject("Excel.Sheet")
ExcelSheet.Application.Visible = True

if you type createobject in your helpbar MS returns some nice instructions
on working with this
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"ryguy7272" wrote:

In a newly created Word document, I created a reference to €˜Normal under
Tools References Normal. I was experimenting with a few different
techniques to use Word to open an Excel file. I got the macro working, but
now I can no longer use Ctrl+C to copy text!! I tried to end the reference
to Normal and I tried to remove the VBA module€¦nothing seems to work!! This
probably wouldnt be a problem at all, except for the fact that all every
single word.doc seems to be affected by this macro. My question is a
two-parter:

Does anyone have any suggestions as to how to end the Ctrl+C problem, and
just basically restore my word documents to the way they were before.

Also, does anyone have any suggestions as to how to open an Excel file from
a Word document? I tried things such as Insert Hyperlink, and Insert
Object. None of these things worked. What I really want to do is simply
open an Excel file on a network drive. I dont want to import the data from
the Excel file into my Word document.


Cordially,
Ryan---

PS, sorry if this posts twice; I didn't see it show up in the list even
though I could swear that I posted it earlier this morning... Also, sorry
for posting on the Word DG and now the Excel DG, but I didn't get a response
on the other DG.
--
RyGuy
--
RyGuy



All times are GMT +1. The time now is 09:38 PM.

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