S
S1lverface
AAarrrrrrrrghhhhhhhh. Can anyone help please.
I have a Macro in Excle VBA which Opens my Word (.doc) file.
I then want it to run the chosen Macro called PrintBPs which is saved within
that word document under the path: Normal > Modules > NewMacros >
I cannot get it to tun the Macro. I have tried many combinations of
Application.run xxxxxxx
When I try Application.run MacroName:="PrintBPs" it tells me Named Argument
not found.
I am so lost. If anyone can help?
------------------------------------------
Below is the code
Sub OpenAWordDoc()
Dim WdApp As Object, WdDoc As Object
Set WdApp = CreateObject("Word.Application")
WdApp.Application.DisplayAlerts = False
WdApp.Documents.Open Filename:="""\\rdc-san04\Method\Briefing Pack -
SB.doc""", _
ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
wdOpenFormatAuto
WdApp.Windows.Application.Activate
WdApp.Visible = True
Application.Run "Normal.NewMacros.Modules.PrintBPs"
End Sub
I have a Macro in Excle VBA which Opens my Word (.doc) file.
I then want it to run the chosen Macro called PrintBPs which is saved within
that word document under the path: Normal > Modules > NewMacros >
I cannot get it to tun the Macro. I have tried many combinations of
Application.run xxxxxxx
When I try Application.run MacroName:="PrintBPs" it tells me Named Argument
not found.
I am so lost. If anyone can help?
------------------------------------------
Below is the code
Sub OpenAWordDoc()
Dim WdApp As Object, WdDoc As Object
Set WdApp = CreateObject("Word.Application")
WdApp.Application.DisplayAlerts = False
WdApp.Documents.Open Filename:="""\\rdc-san04\Method\Briefing Pack -
SB.doc""", _
ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
wdOpenFormatAuto
WdApp.Windows.Application.Activate
WdApp.Visible = True
Application.Run "Normal.NewMacros.Modules.PrintBPs"
End Sub