Jberlin2016
New Member
- Joined
- Jul 6, 2016
- Messages
- 2
I have a sheet with several workbooks.
The aim of the sheet is to generate a text of a letter automatically depending on a lot of parameters.
In one of the workbooks I have the result in column A. lets call this workbook corrections
The content of the cells in letter_text might be in English, German or French, meaning that it includes characteres like ü, è, ö, é etc.
I created some VB code and assigned it to several buttons in order to export the content of the column A of corrections workbook as a plain text file (extension .txt)
There are only three possibilities in Excel, MSdostext, unicode text, and with tab and even csv.
I need to be able to export the plain text including the special characters of these specific two languages and avoiding any change in the text taht I see in Excel.
So far I wrote the following to export it in three formats. All the three kid of files (msdos text, unicode, and tab separation) are so to say "contaminated" somehow, sometimes including extra " (quotations marks) other not getting the mentioned ü, è, ö, é right.
Any help please
Sub corrections_ALL()
'
' corrections_ALL Macro
'
' msdos Macro
'
Sheets("corrections").Select
Cells.Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\JF30443\Desktop\WORK\EXCEL\corrections_msdos\corrections.txt", FileFormat:=xlTextMSDOS
' unicodetext
'
Sheets("corrections").Select
Cells.Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\JF30443\Desktop\WORK\EXCEL\corrections_unicodetext\corrections.txt", FileFormat:=xlUnicodeText
' withtab
'
Sheets("corrections").Select
Cells.Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\JF30443\Desktop\WORK\EXCEL\corrections_withtab\corrections.txt", FileFormat:=xlText
End Sub
The aim of the sheet is to generate a text of a letter automatically depending on a lot of parameters.
In one of the workbooks I have the result in column A. lets call this workbook corrections
The content of the cells in letter_text might be in English, German or French, meaning that it includes characteres like ü, è, ö, é etc.
I created some VB code and assigned it to several buttons in order to export the content of the column A of corrections workbook as a plain text file (extension .txt)
There are only three possibilities in Excel, MSdostext, unicode text, and with tab and even csv.
I need to be able to export the plain text including the special characters of these specific two languages and avoiding any change in the text taht I see in Excel.
So far I wrote the following to export it in three formats. All the three kid of files (msdos text, unicode, and tab separation) are so to say "contaminated" somehow, sometimes including extra " (quotations marks) other not getting the mentioned ü, è, ö, é right.
Any help please
Sub corrections_ALL()
'
' corrections_ALL Macro
'
' msdos Macro
'
Sheets("corrections").Select
Cells.Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\JF30443\Desktop\WORK\EXCEL\corrections_msdos\corrections.txt", FileFormat:=xlTextMSDOS
' unicodetext
'
Sheets("corrections").Select
Cells.Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\JF30443\Desktop\WORK\EXCEL\corrections_unicodetext\corrections.txt", FileFormat:=xlUnicodeText
' withtab
'
Sheets("corrections").Select
Cells.Select
ActiveWorkbook.SaveAs Filename:= _
"C:\Users\JF30443\Desktop\WORK\EXCEL\corrections_withtab\corrections.txt", FileFormat:=xlText
End Sub