Run Word Macro from excel, HELP!
Posted by RoB on October 09, 2001 3:27 PM
I found some code in the Archive 2 by Ivan I think, but I'm having problems. Here is my code (excel 2000):
Sub RunWordMerge()
Dim WordObj As Word.Application
Set WordObj = CreateObject("word.application")
With WordObj
.Documents.Open "S:\FileServer\Shared Files\DataBases\2000 Files DB\Refi Mass Mailer.doc"
.Visible = True 'Or False if you don't want it visible
.Run "MergeMacro"
.Quit
End With
Set WordObj = Nothing
Workbooks("2000 Files Input Screen.xls").Activate
End Sub
When i run it, im getting the error "Compile Error: User-defined type not defined." Can someone help me?? Thanks :)