<?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=1050</link>
		<atom:link href="https://itpmr.ru/extern.php?action=feed&amp;tid=1050&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «Открывать документ на чтение, если документ уже открыт».]]></description>
		<lastBuildDate>Wed, 25 Jul 2018 08:28:47 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Открывать документ на чтение, если документ уже открыт]]></title>
			<link>https://itpmr.ru/viewtopic.php?pid=124706#p124706</link>
			<description><![CDATA[<p>Скрипт, который делает и открывает копию документа на чтение, если документ уже открыт на редактирование у другого пользователя.<br />Событие Postopen на форме.</p><div class="codebox"><pre><code>Sub Postopen(Source As Notesuidocument)

    Dim session As New NotesSession
    Dim ws As New notesuiworkspace
    Dim doc As notesdocument, curdoc As notesdocument

....
        Source.EditMode = True    
        
If source.EditMode=False Then            
source.close                    
answer% = Messagebox(&quot;Открыть КОПИЮ документа ДЛЯ ЧТЕНИЯ ?  Изменения в документе не будут сохранены ! &quot;, 1, &quot;Внимание!&quot;)
    If answer%=1 Then
    Set doc=db.CreateDocument
    Call source.Document.CopyAllItems(doc)
    doc.saveoptions=&quot;0&quot;
    Call ws.EditDocument(True, doc)
    End If                        
End If</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (admin)]]></author>
			<pubDate>Wed, 25 Jul 2018 08:28:47 +0000</pubDate>
			<guid>https://itpmr.ru/viewtopic.php?pid=124706#p124706</guid>
		</item>
	</channel>
</rss>
