To write data into excel file from access

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • atksamy
    New Member
    • Oct 2008
    • 91

    To write data into excel file from access

    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?

    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")
  • overcomer
    New Member
    • Nov 2008
    • 25

    #2
    you may want to browse the answer of one member here.... i'm also looking on ways to write data from access to excel...

    Last edited by Stewart Ross; Nov 11 '08, 05:02 PM. Reason: corrected hyperlink

    Comment

    Working...