<print the doc from within the function>
I am using the function below to grab a text file and save it as
a word doc...how can I print the doc once saved..
Have tried.
objWord.print and objDoc.print without success
Code:
Public Function WordDoc(sFileName As String, sNewDoc As String) As String
'Open the text file into word and save it as a word doc behind the scenes
Dim objWord As Object
Dim objDoc As Object
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open(sFileName)
objWord.Selection.WholeStory
objDoc.Print
objDoc.SaveAs sNewDoc, 0 'wdFormatDocument
[color-red] want to print at this point[/color]
objDoc.Close
objWord.Quit
'clear memory of the objects
Set objDoc = Nothing
Set objWord = Nothing
End Function