Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
From within a Word macro I'm trying to save an Excel object as a csv file,
but can't seem to find any documentation that explains how to do it. Any ideas? Code below -- I've tried objExcel.dialogs(xlDialogSaveAs).show but get an error saying that xlDialogSaveAs is an undefined variable, and when I try to specify xlCSV as a file format I get the same undefined variable error: sub SaveAsCSV() Dim objExcel As Object Set objExcel = CreateObject("Excel.Application") objExcel.Workbooks.Add [snip - doing stuff to workbook] objExcel.ActiveWorkbook.SaveAs FileName:="c:\myfile.csv" 'The above line saves as an .xls even if the suffix is ".csv" objExcel.Application.Quit Set objExcel = Nothing end sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
excel object linked to word will not add sums in word | Excel Discussion (Misc queries) | |||
PLS HELP! Excel imbedded object in Word | Excel Discussion (Misc queries) | |||
Print Word Object in Excel | Excel Discussion (Misc queries) | |||
TO MODIFY A EXCEL OBJECT FROM WORD USING VBA | Excel Programming | |||
Using vb to create an excel object and save it as a CSV file | Excel Programming |