Save As CSV Western European Windows Encoding

dgr

Board Regular
Joined
Apr 24, 2005
Messages
176
Hi,
I'm using Excel 2013. This issue is related to both Excel & Word.

I want to save a worksheet as a csv with Western European Windows Encoding (alternatively known as Window Default Encoding). This is because I plan to open this csv file in Word 2013 with Western European Windows Encoding. I don't want to be prompted by the File Conversion dialog box in Word too. My code is below. How do I edit it accordingly?
Code:
Sub Macro1()

    Cells.Select
    Range("J1").Activate
    Selection.Copy
    Workbooks.Add
    ActiveSheet.Paste
    Application.CutCopyMode = False
    ChDir "C:\path\to\Desktop"
    ActiveWorkbook.SaveAs Filename:= _
        "C:\path\to\Desktop\the_csv_file.csv", FileFormat:=xlCSV, _
        CreateBackup:=False
    ActiveWorkbook.Save
    ActiveWindow.Close
End Sub
Alternatively, I plan to open this csv file using a Word macro. Is there any code I can enter into the Word macro to force Word to open the csv file with with Western European Windows Encoding? My Word macro is below. Thanks for your help.
Code:
Sub open_csv()

    ChangeFileOpenDirectory "C:\path\to\file\"
    Documents.Open FileName:="the_csv_file.csv", ConfirmConversions:=False, _
        ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
        PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
        WritePasswordTemplate:="", Format:=wdOpenFormatAuto
End Sub
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.

Forum statistics

Threads
1,214,908
Messages
6,122,186
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top