'Add custom property to 97/2003 MSOffice Files (xls/doc/ppt) using DSOFile 2.1

I'm trying to add custom property on the ppt file. But Received value("güsiöçÇÖISÜG") is not equal sent value("ğüşiöçÇÖİŞÜĞ").

enter image description here

I faced a strange situation like that:

  • Open the sample.ppt by LibreOffice.
  • Save (CTRL+S) and Close, any change is not necessarily.
  • Run the code again.
  • And two values are equal

Sample ppt files is here: https://drive.google.com/drive/folders/1qTlREuLAAM-I0JIn-htPwLEUwRjQ9IiJ?usp=sharing

Is there anyone to help me, thanks.



Solution 1:[1]

You need to check encodings of your Excel files. Most probably a software (DSO) generates a UTF-8 based document instead of UTF-16. For example, you may try using the following code:

Dim strEncodingName As String = String.Empty
Dim myStreamRdr As System.IO.StreamReader = New System.IO.StreamReader(myFileName, True)
Dim myString As String = myStreamRdr.ReadToEnd()
strEncodingName = mmFileIA.CurrentEncoding.EncodingName

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Eugene Astafiev