I have a program that needs to write the contents of a string to a Microsoft Word file and save it, the problem is i can not see any write command has anyone done this before that could show me please.
Dim oWord As Word.Application
Dim oDoc As Word.Document
oWord = CreateObject("Word.Application")
oWord.Visible = True
oDoc = oWord.Documents.Add
oDoc.Range.Text = "My text"
oDoc.SaveAs("c:\test.doc")
oWord.Application.Quit()
__________________________________________ Try forum1391 for lively discussions
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.