PDA

View Full Version : Sending Text to an existing Batch Script to be used as variables (Encoding)



thanasiscy
07-20-2015, 04:36 AM
Dear all,

I face some issues with the encoding when i try to capture some text using VBA (either this is filename or a Cell text).
i need to capture the text within VBA and then send it to an existing Batch Script or a Text File.

In case of the text file my batch script cannot read the created text file.
In case of the script. My variables are shown correct when the batch script is UTF-8, but when i change it to ANSI then they get scrambled and the script itself do not read them correct.

Is there any good quide on this? I am using VBA 7.1
I want to reading different text from Cells or filenames and be able to have the text as ANSI and send it as ANSI so then i can effectively read it in my batch scripts without loosing or messing the characters.

Thanks in advance for your help.

Best Regards,
Athanasios

semin
09-11-2015, 04:22 PM
This is where you introduce yourself.

Wrong place to ask questions here.

thanasiscy
09-15-2015, 12:15 AM
Hi semi,

Sorry for this.
Thanks for the information.

Sincerely,
Athanasios

snb
09-15-2015, 12:44 AM
Why do you use a batch script instead of VBA ?

thanasiscy
09-15-2015, 01:32 AM
Hi snb,

Unfortunately the data have to be sent to a batch script.

I have solved this issue.

1. When the existing script file was encoded as UTF-8 then the data was correct
2. When sending the data to a text file i could use the command "type" and read the data from the text file.

I am trying to remove the post.

Sincerely,
Athanasios Constantinou

thanasiscy
09-15-2015, 01:33 AM
Thanks for all your time:)