<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.harlamenkov.ru/index.php?action=history&amp;feed=atom&amp;title=EN%2Fdocumentation%2Fbasic_guide%2Fdocuments</id>
	<title>EN/documentation/basic guide/documents - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.harlamenkov.ru/index.php?action=history&amp;feed=atom&amp;title=EN%2Fdocumentation%2Fbasic_guide%2Fdocuments"/>
	<link rel="alternate" type="text/html" href="https://wiki.harlamenkov.ru/index.php?title=EN/documentation/basic_guide/documents&amp;action=history"/>
	<updated>2026-11-11T13:51:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://wiki.harlamenkov.ru/index.php?title=EN/documentation/basic_guide/documents&amp;diff=15916&amp;oldid=prev</id>
		<title>Sancho: Основной текст</title>
		<link rel="alternate" type="text/html" href="https://wiki.harlamenkov.ru/index.php?title=EN/documentation/basic_guide/documents&amp;diff=15916&amp;oldid=prev"/>
		<updated>2011-09-02T11:39:28Z</updated>

		<summary type="html">&lt;p&gt;Основной текст&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;section begin=title /&amp;gt;&amp;lt;noinclude&amp;gt;{{DISPLAYTITLE:&amp;lt;/noinclude&amp;gt;Working with {{OOo}} Documents&amp;lt;noinclude&amp;gt;}}&amp;lt;/noinclude&amp;gt;&amp;lt;section end=title /&amp;gt;{{BreadCrumbL10n}}&lt;br /&gt;
&lt;br /&gt;
{{Documentation/BASICGuideTOC&lt;br /&gt;
|ShowPrevNext=block&lt;br /&gt;
|ShowPrevPage=block&lt;br /&gt;
|PrevPage=EN/documentation/basic_guide/interface_overview&lt;br /&gt;
|NextPage=EN/documentation/basic_guide/stardesktop&lt;br /&gt;
|docs=block&lt;br /&gt;
}}&lt;br /&gt;
 &lt;br /&gt;
The {{OOo}} API has been structured so that as many of its parts as possible can be used universally for different tasks. This includes the interfaces and services for creating, opening, saving, converting, and printing documents and for template administration. Since these function areas are available in all types of documents, they are explained first in this chapter.&lt;br /&gt;
&lt;br /&gt;
* [[EN/documentation/basic_guide/stardesktop|The StarDesktop]]&lt;br /&gt;
* [[EN/documentation/basic_guide/templates|Styles and Templates]]&lt;br /&gt;
&lt;br /&gt;
=== The current document ===&lt;br /&gt;
&lt;br /&gt;
In previous versions of the Basic Programming Guide these instructions were used to obtain the current document :&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
Dim Doc As Object&lt;br /&gt;
&lt;br /&gt;
Doc = StarDesktop.CurrentComponent&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This correct code has a drawback : it does not work if the macro is started from the IDE because it then refers to the IDE, not the document. This code works only if the macro is started from the document itself!&lt;br /&gt;
&lt;br /&gt;
You should instead use Basic object &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;ThisComponent&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt;. It returns the document object on which the macro is run. If you start the macro from the IDE, &amp;lt;b&amp;gt;&amp;lt;tt&amp;gt;ThisComponent&amp;lt;/tt&amp;gt;&amp;lt;/b&amp;gt; will still find and return your document.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;oobas&amp;quot;&amp;gt;&lt;br /&gt;
Dim Doc As Object&lt;br /&gt;
&lt;br /&gt;
Doc = ThisComponent ' recommended coding for Basic&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
{{PDL1}}&lt;/div&gt;</summary>
		<author><name>Sancho</name></author>
		
	</entry>
</feed>