Hello all,
I am trying to convert a pivot table to a functional csv file. This is what I have so far but keep getting error messages. Any suggestions would be so very appreciated.
Thanks!
Alexa
sub Export_To_Excel_View1
Dim xlApp
Dim xlBook
Dim xlSheet
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = true
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets("Sheet1")
Set Doc = ActiveDocument
Doc.GetSheetObject("CH89").CopyTableToClipBoard true
xlApp.ActiveSheet.Range("A1").Select
xlApp.ActiveSheet.Paste
end sub
I am trying to convert a pivot table to a functional csv file. This is what I have so far but keep getting error messages. Any suggestions would be so very appreciated.
Thanks!
Alexa
sub Export_To_Excel_View1
Dim xlApp
Dim xlBook
Dim xlSheet
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = true
Set xlBook = xlApp.Workbooks.Add
Set xlSheet = xlBook.Worksheets("Sheet1")
Set Doc = ActiveDocument
Doc.GetSheetObject("CH89").CopyTableToClipBoard true
xlApp.ActiveSheet.Range("A1").Select
xlApp.ActiveSheet.Paste
end sub