Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Getting Word to work with Excel

Hi all,
I'm trying to use VBA to coordinate Word and Excel. I know that to
do so, you need to configure something under Tools-References.
Unfortunately, when I look under the Tools menu, References is grayed
out--does anyone know why this might be, and what I'd have to do to
enable it?

Thanks,
Mike

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Getting Word to work with Excel

Oops, sorry for the double-post...anyway, if it helps, I'm using
Microsoft Office Word/Excel SP2, with Visual Basic 6.3.

wrote:
Hi all,
I'm trying to use VBA to coordinate Word and Excel. I know that to
do so, you need to configure something under Tools-References.
Unfortunately, when I look under the Tools menu, References is grayed
out--does anyone know why this might be, and what I'd have to do to
enable it?

Thanks,
Mike


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Getting Word to work with Excel

It would be greyed out if you were stepping through the macro?

However, you shouldn't need to add the reference - just use the
following code


Dim appwd As Object
On Error GoTo notloaded
Set appwd = GetObject(, "Word.Application")
notloaded:
If Err.Number = 429 Then
Set appwd = CreateObject("Word.Application")
'if not adding a new document in your process, add it now
as this
'method would give an instance of Word WITHOUT a doc!
End If
appwd.Visible = True
On Error GoTo 0
With appwd
'do what you want
end with

wrote:
Oops, sorry for the double-post...anyway, if it helps, I'm using
Microsoft Office Word/Excel SP2, with Visual Basic 6.3.

wrote:
Hi all,
I'm trying to use VBA to coordinate Word and Excel. I know that to
do so, you need to configure something under Tools-References.
Unfortunately, when I look under the Tools menu, References is grayed
out--does anyone know why this might be, and what I'd have to do to
enable it?

Thanks,
Mike


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Getting Word to work with Excel

Do you have a workbook open and it is the activeproject. References are
particular to a workbook - not the excel application.

--
Regards,
Tom Ogilvy


" wrote:

Hi all,
I'm trying to use VBA to coordinate Word and Excel. I know that to
do so, you need to configure something under Tools-References.
Unfortunately, when I look under the Tools menu, References is grayed
out--does anyone know why this might be, and what I'd have to do to
enable it?

Thanks,
Mike


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Excel work like Word? Rob Excel Discussion (Misc queries) 2 February 8th 07 11:48 PM
Getting Word to work with Excel [email protected] Excel Programming 0 June 7th 06 01:17 PM
saving work in word/excel onto a usb flashdrive Julie Excel Discussion (Misc queries) 2 December 19th 05 03:49 PM
Which Excel and Word will work with Windows x64? x64 Excel Discussion (Misc queries) 1 November 10th 05 01:40 AM
Is there a 'WORK' menu in Excel ? (same as WORD) Andrew Wilson Excel Programming 1 May 13th 05 03:02 PM


All times are GMT +1. The time now is 08:58 PM.

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"