|
|
|
сменить кодировку не получается
|
|||
|---|---|---|---|
|
#18+
'msoEncodingCyrillic 1251 'msoEncodingCyrillicAutoDetect 51251 Dim WordObj As Word.Application Dim WordDoc As Word.Document Set WordObj = CreateObject("Word.Application") WordObj.Options.DefaultTextEncoding = 51251 '????--- не дают runtime error 5 Set WordDoc = WordObj.Documents.Open ("C:\2.txt") WordDoc.TextEncoding = 51251 '?????--- не дают runtime error 5 WordObj.Visible = True WordDoc.Close Set WordObj = Nothing Что за уйня млин ? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2006, 11:30:33 |
|
||
|
сменить кодировку не получается
|
|||
|---|---|---|---|
|
#18+
В хелпе по свойствам DefaultTextEncoding, TextEncoding написано, что: авторmsoEncodingAutoDetect Not used with this property. Попробуй задать конкретную кодировку, а не AutoDetect. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2006, 11:55:41 |
|
||
|
сменить кодировку не получается
|
|||
|---|---|---|---|
|
#18+
Да не до читал всеравно не работает Смысл задачи: открыть текстовый файл в MSW без всплывающих окон типа "выберите кодировку текста" и прочих окон, в кодировке 1251 строка WordDoc.TextEncoding = 1251 не помогает открывается всё в квадратиках. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2006, 12:44:17 |
|
||
|
сменить кодировку не получается
|
|||
|---|---|---|---|
|
#18+
.TextEncoding - для сохранения. Для открытия: Documents.Open(FileName, ConfirmConversions, ReadOnly, AddToRecentFiles, PasswordDocument, PasswordTemplate, Revert, WritePasswordDocument, WritePasswordTemplate, Format, Encoding, Visible, OpenConflictDocument, OpenAndRepair , DocumentDirection, NoEncodingDialog) Encoding - Optional Variant. The document encoding (code page or character set) to be used by Microsoft Word when you view the saved document. Can be any valid MsoEncoding constant. For the list of valid MsoEncoding constants, see the Object Browser in the Visual Basic Editor. The default value is the system code page. NoEncodingDialog - Optional Variant. True to skip displaying the Encoding dialog box that Word displays if the text encoding cannot be recognized. The default value is False. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2006, 13:16:18 |
|
||
|
сменить кодировку не получается
|
|||
|---|---|---|---|
|
#18+
т.е. примерно так: Код: plaintext 1. 2. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2006, 13:24:21 |
|
||
|
сменить кодировку не получается
|
|||
|---|---|---|---|
|
#18+
2Andres 1 Бльшое спсибо, за ответ, но результат их мать тот же - знаки вопросов !!! ???????????? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 10.03.2006, 15:13:35 |
|
||
|
сменить кодировку не получается
|
|||
|---|---|---|---|
|
#18+
Похоже, формат должен быть не текст (4), а wdOpenFormatEncodedText, т.е. 5 ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 11.03.2006, 03:03:57 |
|
||
|
|

start [/forum/topic.php?fid=61&msg=33592997&tid=2185115]: |
0ms |
get settings: |
10ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
80ms |
get topic data: |
11ms |
get forum data: |
3ms |
get page messages: |
43ms |
get tp. blocked users: |
2ms |
| others: | 240ms |
| total: | 410ms |

| 0 / 0 |
