HI,
I am currently using this code to write data in to a word file, How can i modify this to write data into a excel file column wise and save it as csv file?
I am currently using this code to write data in to a word file, How can i modify this to write data into a excel file column wise and save it as csv file?
Code:
Dim objWord As Word.Application Dim docWord As Word.Document Dim docExists As Boolean Set objWord = CreateObject("Word.Application") objWord.Visible = True On Error GoTo OpenDoc docExists = False Set docWord = objWord.Documents.Open("C:\REPORT1.doc") docExists = True OpenDoc: On Error GoTo 0 If Not docExists Then Set docWord = objWord.Documents.Add End If docWord.Content.InsertAfter "xxxxxxxxxx" objWord.Visible = True docWord.Content.InsertParagraphAfter docWord.SaveAs ("C:\REPORT1.doc")
Comment