Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Sean Anderson   on Jan 29 In MS Office Category.

  
Question Answered By: Allison Stanley   on Jan 29

For excel  and text  documents, record a macro of yourself opening and
printing to see how it is done. For word, you can use something like:

Sub WordPrint()
Dim objWord As Object
p = Application.ThisWorkbook.Path
f = p & "\" & "Test.doc"

Set objWord = CreateObject("Word.Application")
objWord.Visible = 1
With objWord
.Documents.Open Filename:=f
.ActiveDocument.PrintOut
.ActiveWindow.Close
.Quit
End With
Set objWord = Nothing
End Sub

Share: 

 
 


Tagged: