R
Rocky McKinley
My routine below works beautifully, I would like to pass the variable
"NumToPrint" to a Word macro called "Print10", so I can use it there to
determine the number of copies I should print.
Does anyone know how can I accomplish this?
Public NumToPrint As Integer
Sub PrintPostInstructions()
Dim oWord As Object
NumToPrint = Cells(1, 6)
On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err Then
Set oWord = CreateObject("Word.Application")
End If
On Error GoTo 0
oWord.Application.Visible = True
oWord.Application.Activate
With oWord
..Documents.Open Filename:="E:\Documents\Angelika's Studio\Permanent
Make-Up\Post Instructions.doc", ReadOnly:=False
..Application.Run MacroName:="Normal.NewMacros.Print10"
oWord.Quit
End With
Set oWord = Nothing
End Sub
Thanks in advance,
Rocky McKinley
"NumToPrint" to a Word macro called "Print10", so I can use it there to
determine the number of copies I should print.
Does anyone know how can I accomplish this?
Public NumToPrint As Integer
Sub PrintPostInstructions()
Dim oWord As Object
NumToPrint = Cells(1, 6)
On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err Then
Set oWord = CreateObject("Word.Application")
End If
On Error GoTo 0
oWord.Application.Visible = True
oWord.Application.Activate
With oWord
..Documents.Open Filename:="E:\Documents\Angelika's Studio\Permanent
Make-Up\Post Instructions.doc", ReadOnly:=False
..Application.Run MacroName:="Normal.NewMacros.Print10"
oWord.Quit
End With
Set oWord = Nothing
End Sub
Thanks in advance,
Rocky McKinley