Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default need help creating a Batch-File

Hi,

I'm trying to generate a DOS-Batchfile out of Excel and everything works fine until there are german umlauts (like ä, ö, ü) in it.

E.g. if I write a command like

mv c:\ae.txt c:\ä.txt

to the file and I execute the Batchfile the prompt shows

mv c:\ae.txt c:\õ.txt

So, ä gets replaced by õ

I'm creating an Ascii-File

'create Batchfile
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(vBatchFile, 8, True, 0)

but it looks to me that there are differences between ASCII-Format and DOS-Format.

Any ideas?

Best regards,

Rainer

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default need help creating a Batch-File

found a workaround/solution:

for me it's good enough just to replace german umlauts (ä, ö, ü, Ä, Ö, Ü).
I will never use other characters which may be different.

vCommand = Replace(vCommand, "ä", Chr(132), 1, -1, vbTextCompare)
vCommand = Replace(vCommand, "ö", Chr(148), 1, -1, vbTextCompare)
vCommand = Replace(vCommand, "ü", Chr(129), 1, -1, vbTextCompare)
vCommand = Replace(vCommand, "Ä", Chr(142), 1, -1, vbTextCompare)
vCommand = Replace(vCommand, "Ö", Chr(153), 1, -1, vbTextCompare)
vCommand = Replace(vCommand, "Ü", Chr(154), 1, -1, vbTextCompare)



"Rainer Bielefeld" schrieb im Newsbeitrag ...
Hi,

I'm trying to generate a DOS-Batchfile out of Excel and everything works fine until there are german umlauts (like ä, ö, ü) in
it.

E.g. if I write a command like

mv c:\ae.txt c:\ä.txt

to the file and I execute the Batchfile the prompt shows

mv c:\ae.txt c:\õ.txt

So, ä gets replaced by õ

I'm creating an Ascii-File

'create Batchfile
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(vBatchFile, 8, True, 0)

but it looks to me that there are differences between ASCII-Format and DOS-Format.

Any ideas?

Best regards,

Rainer


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
batch file call from a macro - how ? and required batch format VB-rookie Excel Programming 4 September 6th 08 12:52 AM
Would Like to Automate Batch File Creation and Text FIle Import socrtwo Excel Discussion (Misc queries) 2 August 18th 06 03:54 PM
creating Excell with Digital Certificate - Batch Mode jo Excel Programming 0 March 13th 06 12:03 PM
creating Excell with Digital Certificate - Batch Mode jo Excel Programming 0 March 13th 06 12:02 PM
Create a batch file from a number of Excel File Vinay[_2_] Excel Programming 0 September 8th 04 01:11 AM


All times are GMT +1. The time now is 06:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"