K Kevin Nov 5, 2003 #1 I am trying to run a Word macro in Excel macro. Could someone show me an sample? Thanks Kevin
C Chip Pearson Nov 5, 2003 #2 Kevin, Try something like the following Dim WD As Word.Application Dim Doc As Word.Document Set WD = New Word.Application With WD Set Doc = .Documents.Open("C:\doc1.doc") .Run "Doc1!TheMacro" Doc.Close savechanges:=False .Quit End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed)
Kevin, Try something like the following Dim WD As Word.Application Dim Doc As Word.Document Set WD = New Word.Application With WD Set Doc = .Documents.Open("C:\doc1.doc") .Run "Doc1!TheMacro" Doc.Close savechanges:=False .Quit End With -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (e-mail address removed)