<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: получение текста писем из Outlook из определенной папки]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17392&amp;type=atom" />
	<updated>2022-10-10T16:33:00Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17392</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: получение текста писем из Outlook из определенной папки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155185#p155185" />
			<content type="html"><![CDATA[<p><strong>Clannad5</strong>, добрый вечер. <br />Спасибо большое за помощь. Нашел в ваших примерах тот код, что мне был нужен:<br /></p><div class="codebox"><pre><code>
olApp := ComObjActive(&quot;Outlook.Application&quot;)
olTestFolder := olApp.Session.Folders(&quot;ppp.garshin@yandex.ru&quot;).Folders.Item(&quot;Заказы&quot;)
olLoopFolder(olTestFolder)
ExitApp

olLoopFolder(olFolder) 
{
    s := &quot;Folder: &quot; olFolder.Name &quot;`r`n&quot;
	for olItem in olFolder.Items
	{
		s := olItem.Body &quot;`r`n&quot;
		MsgBox, %s%
    }
}
</code></pre></div><p>Все работает как надо. Буду сейчас подгонять под себя.</p>]]></content>
			<author>
				<name><![CDATA[pavel.garshin.01]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42521</uri>
			</author>
			<updated>2022-10-10T16:33:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155185#p155185</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: получение текста писем из Outlook из определенной папки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=155008#p155008" />
			<content type="html"><![CDATA[<p><strong>pavel.garshin.01</strong><br />Попробуйте посмотреть это: <a href="https://github.com/Ixiko/AHK-libs-and-classes-collection/tree/master/msOffice/Outlook">https://github.com/Ixiko/AHK-libs-and-c … ce/Outlook</a></p>]]></content>
			<author>
				<name><![CDATA[Clannad5]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39853</uri>
			</author>
			<updated>2022-10-01T11:54:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=155008#p155008</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: получение текста писем из Outlook из определенной папки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154973#p154973" />
			<content type="html"><![CDATA[<p>Добрый день.<br />Пытаюсь получить тексты писем из Outlook из определенной папки моего почтового ящика на работе.<br />Нашел код на просторах интернета, но он не работает:<br /></p><div class="codebox"><pre><code>
F5::
	olApp := ComObjCreate(&quot;Outlook.Application&quot;)
	olNameSpace := olApp.GetNamespace(&quot;MAPI&quot;)
	olFolder := olNameSpace.Folders(&quot;ppp.garshin@yandex.ru&quot;).Folders(&quot;Заказы&quot;)
	sSubject := &quot;Сладости Славянка: заказ&quot;
	for olItem in olFolder.Items.Restrict(&quot;@SQL=&quot;&quot;http://schemas.microsoft.com/mapi/proptag/0x0037001f&quot;&quot; = &#039;&quot; sSubject &quot;&#039;&quot;)
		MsgBox % olItem.CreationTime &quot;`n&quot; olItem.ReceivedTime &quot;`n&quot; olItem.Subject &quot;`n&quot; olItem.Body	; Any valid Item property will work here
return
</code></pre></div><p>Подставил свое мыло, название папки и в sSubject указал отрывок темы.<br />Папка Заказы находится в верхней иерархии (не вложена). После запуска видно, что скрипт запускает Outlook в фоновом режиме, но больше ничего не происходит. <br />Подскажите пожалуйста в чем может быть проблема?</p><p>P.S. Еще меня немного беспокоит командное слово SQL в цикле. Это случайно не из области взлома через SQL инъекции? Я ведь экспериментировал прямо на работе, с рабочей почты. За мной безопасники не прибегут?</p>]]></content>
			<author>
				<name><![CDATA[pavel.garshin.01]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42521</uri>
			</author>
			<updated>2022-09-30T14:13:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154973#p154973</id>
		</entry>
</feed>
