<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Форум компьютерной помощи &mdash; Сохранение и отображение картинки в поле]]></title>
		<link>https://itpmr.ru/viewtopic.php?id=818</link>
		<atom:link href="https://itpmr.ru/extern.php?action=feed&amp;tid=818&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Сохранение и отображение картинки в поле».]]></description>
		<lastBuildDate>Wed, 09 Apr 2014 06:53:00 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Сохранение и отображение картинки в поле]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=124143#p124143</link>
			<description><![CDATA[<p>То же самое, только меньше текста:</p><p>Sub Click(Source As Button)<br />&nbsp; &nbsp; Dim s As New NotesSession<br />&nbsp; &nbsp; Dim db As NotesDatabase<br />&nbsp; &nbsp; Dim doc As NotesDocument<br />&nbsp; &nbsp; Dim body As NotesMIMEEntity<br />&nbsp; &nbsp; Dim stream As NotesStream<br />&nbsp; &nbsp; Set db = s.CurrentDatabase<br />&nbsp; &nbsp; s.ConvertMIME = False &#039; Do not convert MIME to rich text<br />&nbsp; &nbsp; Set doc = db.CreateDocument<br />&nbsp; &nbsp; Call doc.ReplaceItemValue(&quot;Form&quot;, &quot;fmejved&quot;)<br />&nbsp; &nbsp; Set body = doc.CreateMIMEEntity<br />&nbsp; &nbsp; Set stream = s.CreateStream<br />&nbsp; &nbsp; Call stream.Open(&quot;C:\text\111110.gif&quot;, &quot;binary&quot;) <br />&nbsp; &nbsp; Call body.SetContentFromBytes(stream, &quot;image/gif&quot;, ENC_IDENTITY_BINARY)<br />&nbsp; &nbsp; Call stream.Close<br />&nbsp; &nbsp; Call doc.Save(True, True)<br />ExitSub:<br />&nbsp; &nbsp; s.ConvertMIME = True &#039; Restore conversion<br />End Sub</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Wed, 09 Apr 2014 06:53:00 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=124143#p124143</guid>
		</item>
		<item>
			<title><![CDATA[Сохранение и отображение картинки в поле]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=124035#p124035</link>
			<description><![CDATA[<p>Этот скрипт создает документ, загружает картинку 111110.gif в поле body на форме fmejved.<br />Картинка отображается не как вложение!</p><p>Sub Click(Source As Button)<br />&nbsp; &nbsp; Dim s As New NotesSession<br />&nbsp; &nbsp; Dim db As NotesDatabase<br />&nbsp; &nbsp; Dim doc As NotesDocument<br />&nbsp; &nbsp; Dim body As NotesMIMEEntity<br />&nbsp; &nbsp; Dim stream As NotesStream<br />&nbsp; &nbsp; Set db = s.CurrentDatabase<br />&nbsp; &nbsp; s.ConvertMIME = False &#039; Do not convert MIME to rich text<br />&nbsp; &nbsp; Set doc = db.CreateDocument<br />&nbsp; &nbsp; Call doc.ReplaceItemValue(&quot;Form&quot;, &quot;fmejved&quot;)<br />&nbsp; &nbsp; Set body = doc.CreateMIMEEntity<br />&nbsp; &nbsp; Set header = body.CreateHeader(&quot;Subject&quot;)<br />&nbsp; &nbsp; Call header.SetHeaderVal(&quot;MIME image from GIF file&quot;)<br />&nbsp; &nbsp; Set stream = s.CreateStream<br />&nbsp; &nbsp; If Not stream.Open(&quot;C:\text\111110.gif&quot;, &quot;binary&quot;) Then<br />&nbsp; &nbsp; &nbsp; &nbsp; Messagebox &quot;C:\text\111110.gif&quot;,&quot;Open failed&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; Goto ExitSub<br />&nbsp; &nbsp; End If<br />&nbsp; &nbsp; If stream.Bytes = 0 Then<br />&nbsp; &nbsp; &nbsp; &nbsp; Messagebox &quot;C:\text\111110.gif&quot;,, &quot;File has no content&quot;<br />&nbsp; &nbsp; &nbsp; &nbsp; Goto ExitSub<br />&nbsp; &nbsp; End If<br />&nbsp; &nbsp; Call body.SetContentFromBytes(stream, &quot;image/gif&quot;, ENC_IDENTITY_BINARY)<br />&nbsp; &nbsp; Call stream.Close<br />&nbsp; &nbsp; Call doc.Save(True, True)<br />ExitSub:<br />&nbsp; &nbsp; s.ConvertMIME = True &#039; Restore conversion<br />End Sub</p>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Tue, 26 Nov 2013 12:11:16 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=124035#p124035</guid>
		</item>
	</channel>
</rss>
