fileformat not working with Object

  • Thread starter Thread starter Nancy
  • Start date Start date
N

Nancy

I created a macro in Word to invoke Excel file and save
the excel file as CSV format. The Excel file can be
opened with no problem, it just won't saved in CSV
format. I created the same macro in Excel, it works. I
don't know why it doesn't work in Word.
 
I would guess you are using late binding and using code like

fileformat:=xlCSV

with late binding, xlCSV is not defined, so it equals 0. You need to use
the hardcoded value.

? xlcsv
6

so
fileformat:=6
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top