A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

A way to open an Excel sheet from Word



 
 
Thread Tools Display Modes
  #1  
Old August 22nd, 2004, 08:12 PM
Tonya Marshall
external usenet poster
 
Posts: n/a
Default A way to open an Excel sheet from Word

I would like the Excel sheet to open in Excel but would like to access
it from a toolbar button in Word.
Is that possible?

  #2  
Old August 23rd, 2004, 08:39 AM
Helmut Weber
external usenet poster
 
Posts: n/a
Default

Hi Tonya,
one way would be to set a reference to the excel library,
"Extras, References, ..." and then the following may be a start:
Dim oExc As Excel.Application
Set oExc = New Excel.Application
With oExc
.Workbooks.Open "c:\test\test.xls"
.Visible = True ' if you like
' do something ...
.ActiveWorkbook.Save
.ActiveWorkbook.Close
.Quit
End With
Set oExc = Nothing
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000

  #3  
Old August 24th, 2004, 12:32 AM
Tonya Marshall
external usenet poster
 
Posts: n/a
Default

Helmut Weber wrote:
Hi Tonya,


I don't know what this means:
one way would be to set a reference to the excel library,
"Extras, References, ..." and then the following may be a start:




Dim oExc As Excel.Application
Set oExc = New Excel.Application
With oExc
.Workbooks.Open "c:\test\test.xls"
.Visible = True ' if you like
' do something ...
.ActiveWorkbook.Save
.ActiveWorkbook.Close
.Quit
End With
Set oExc = Nothing
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000



--
Tonya Marshall
tonz AT harborside DOT com

  #4  
Old August 24th, 2004, 10:17 AM
Helmut Weber
external usenet poster
 
Posts: n/a
Default

Hi Tonya,

I don't know what this means:
one way would be to set a reference to the excel library,
"Extras, References, ..." and then the following may be a start:


It is just one way to get access to all of excels functionality
from Word-VBA. Open the VBA-Editor (VBE) goto extras,
references, browse the list of references and check the
excel library. Step through the macro using F8 in the VBE.
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening Excel Files in Word avj General Discussion 10 July 31st, 2004 01:39 PM
Macro help please: Excel data to word doc anna-maria General Discussion 5 June 30th, 2004 11:53 PM
Field code to pick up Excel sheet Lyndie Mailmerge 1 June 2nd, 2004 11:57 AM
word error mac General Discussions 1 May 6th, 2004 08:14 AM
Opening Excel sheet with macro's on XP machines gives error Dhanashree Bhat Worksheet Functions 0 September 17th, 2003 07:02 AM


All times are GMT +1. The time now is 12:44 AM.


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