<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Чтение DOC-файла]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=18103&amp;type=atom" />
	<updated>2024-02-16T20:30:14Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=18103</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение DOC-файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=160359#p160359" />
			<content type="html"><![CDATA[<p>Попробуйте так:<br /></p><div class="codebox"><pre><code>filePath := A_Desktop . &quot;\test.doc&quot;
FileGetSize, size, % filePath
FileRead, data, *c %filePath%
str := &quot;&quot;
offset := 0
while offset &lt; size {
    part := StrGet(&amp;data + offset, &quot;cp0&quot;)
    str .= part = &quot;&quot; ? &quot; &quot; : part
    offset += part = &quot;&quot; ? 1 : StrLen(part)
}
MsgBox % Clipboard := str</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-02-16T20:30:14Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=160359#p160359</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение DOC-файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=160358#p160358" />
			<content type="html"><![CDATA[<p>Текст нужен не как в открытом doc-файле, а как в открытом Блокноте (простом текстовом редакторе).</p>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2024-02-16T19:38:20Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=160358#p160358</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Чтение DOC-файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=160357#p160357" />
			<content type="html"><![CDATA[<p><strong>1srafel</strong></p><br /><div class="codebox"><pre><code>
oWord := ComObjCreate(&quot;Word.Application&quot;)
doc := oWord.Documents.Open(A_Desktop &quot;\Сопроводительное письмо.doc&quot;) 
MsgBox % doc.Range.Text
doc.Close(false)
oWord.Quit()
ExitApp
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2024-02-16T19:11:26Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=160357#p160357</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Чтение DOC-файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=160356#p160356" />
			<content type="html"><![CDATA[<p>Как получить в переменную тело DOC-файла так, как он выглядит при открытии через простой текстовый файл? То есть, это старый DOC-формат, в котором текст виден в блокноте. Вот так вместо большого содержимого, выводится несколько символов в юникоде:<br /></p><div class="codebox"><pre><code>FileRead, fbody, %File%
msgbox, %fbody%</code></pre></div><p>Пробовал еще так:<br /></p><div class="codebox"><pre><code>FileRead, fbody, *P65001 %File%</code></pre></div><p>Был код, работающий с DOC-файлами, но интересно именно получение текста напрямую.</p>]]></content>
			<author>
				<name><![CDATA[1srafel]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=43566</uri>
			</author>
			<updated>2024-02-16T18:28:59Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=160356#p160356</id>
		</entry>
</feed>
