Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can Excel work like Word? | Excel Discussion (Misc queries) | |||
Getting Word to work with Excel | Excel Programming | |||
saving work in word/excel onto a usb flashdrive | Excel Discussion (Misc queries) | |||
Which Excel and Word will work with Windows x64? | Excel Discussion (Misc queries) | |||
Is there a 'WORK' menu in Excel ? (same as WORD) | Excel Programming |