<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.autoitscript.com/w/index.php?action=history&amp;feed=atom&amp;title=LibreOffice-Examples</id>
	<title>LibreOffice-Examples - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.autoitscript.com/w/index.php?action=history&amp;feed=atom&amp;title=LibreOffice-Examples"/>
	<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=LibreOffice-Examples&amp;action=history"/>
	<updated>2026-07-16T11:37:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=LibreOffice-Examples&amp;diff=15303&amp;oldid=prev</id>
		<title>MLipok: LibreOffice-Examples - donnyh13 mods</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=LibreOffice-Examples&amp;diff=15303&amp;oldid=prev"/>
		<updated>2026-07-14T16:14:14Z</updated>

		<summary type="html">&lt;p&gt;LibreOffice-Examples - donnyh13 mods&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:14, 14 July 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l24&quot;&gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Retrieve the Database Object.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Retrieve the Database Object.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$oDBase = _LOBase_DatabaseGetObjByDoc($oDoc)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Global &lt;/ins&gt;$oDBase = _LOBase_DatabaseGetObjByDoc($oDoc)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Retrieve the Base Document Database Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Retrieve the Base Document Database Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Connect to the Database&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Connect to the Database&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;$oConnection = _LOBase_DatabaseConnectionGet($oDBase)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Global &lt;/ins&gt;$oConnection = _LOBase_DatabaseConnectionGet($oDBase)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to create a connection to the Database. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to create a connection to the Database. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l46&quot;&gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;_LOBase_DocClose($oDoc, False)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;_LOBase_DocClose($oDoc, False)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Close the Base Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Close the Base Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;; Terminate the LibreOffice Process if no instances are still open.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LO_Terminate()&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &quot;Error&quot;, &quot;Failed to Terminate the LibreOffice instance. Error:&quot; &amp;amp; @error &amp;amp; &quot; Extended:&quot; &amp;amp; @extended &amp;amp; &quot; On Line: &quot; &amp;amp; @ScriptLineNumber)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l61&quot;&gt;Line 61:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 65:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Retrieve the presently active Sheet.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Retrieve the presently active Sheet.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Global $oSheet = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOCalc_SheetGetActive&lt;/del&gt;($oDoc)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Global $oSheet = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOCalc_SheetActive&lt;/ins&gt;($oDoc)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the currently active Sheet Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the currently active Sheet Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l114&quot;&gt;Line 114:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 118:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;_LOCalc_DocClose($oDoc, False)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;_LOCalc_DocClose($oDoc, False)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Close the Calc Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Close the Calc Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;; Terminate the LibreOffice Process if no instances are still open.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LO_Terminate()&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &quot;Error&quot;, &quot;Failed to Terminate the LibreOffice instance. Error:&quot; &amp;amp; @error &amp;amp; &quot; Extended:&quot; &amp;amp; @extended &amp;amp; &quot; On Line: &quot; &amp;amp; @ScriptLineNumber)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l129&quot;&gt;Line 129:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 137:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Retrieve the visible document cursor (caret) to insert text with.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Retrieve the visible document cursor (caret) to insert text with.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Global $oViewCursor = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOWriter_DocGetViewCursor&lt;/del&gt;($oDoc)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Global $oViewCursor = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOWriter_CursorViewCursorGetObj&lt;/ins&gt;($oDoc)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the View Cursor Object for the Writer Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the View Cursor Object for the Writer Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Insert some text at the ViewCursor.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Insert some text at the ViewCursor.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOWriter_DocInsertString&lt;/del&gt;($oDoc, $oViewCursor, &quot;Hello from LibreOffice, and AutoIt!&quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOWriter_CursorInsertString&lt;/ins&gt;($oDoc, $oViewCursor, &quot;Hello from LibreOffice, and AutoIt!&quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to insert text. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to insert text. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l146&quot;&gt;Line 146:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 154:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;_LOWriter_DocClose($oDoc, False)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;_LOWriter_DocClose($oDoc, False)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to close opened L.O. Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to close opened L.O. Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;; Terminate the LibreOffice Process if no instances are still open.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LO_Terminate()&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &quot;Error&quot;, &quot;Failed to Terminate the LibreOffice instance. Error:&quot; &amp;amp; @error &amp;amp; &quot; Extended:&quot; &amp;amp; @extended &amp;amp; &quot; On Line: &quot; &amp;amp; @ScriptLineNumber)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l170&quot;&gt;Line 170:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 182:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Retrieve the visible document cursor (caret) to insert text with.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Retrieve the visible document cursor (caret) to insert text with.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Global $oViewCursor = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOWriter_DocGetViewCursor&lt;/del&gt;($oWriterDoc)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Global $oViewCursor = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOWriter_CursorViewCursorGetObj&lt;/ins&gt;($oWriterDoc)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the View Cursor Object for the Writer Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the View Cursor Object for the Writer Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Insert some text at the ViewCursor.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Insert some text at the ViewCursor.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOWriter_DocInsertString&lt;/del&gt;($oWriterDoc, $oViewCursor, &quot;Hello from LibreOffice, and AutoIt!&quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOWriter_CursorInsertString&lt;/ins&gt;($oWriterDoc, $oViewCursor, &quot;Hello from LibreOffice, and AutoIt!&quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to insert text. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to insert text. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l182&quot;&gt;Line 182:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 194:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Retrieve the presently active Sheet.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;; Retrieve the presently active Sheet.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Global $oSheet = &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOCalc_SheetGetActive&lt;/del&gt;($oCalcDoc)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Global $oSheet = &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LOCalc_SheetActive&lt;/ins&gt;($oCalcDoc)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the currently active Sheet Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the currently active Sheet Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l246&quot;&gt;Line 246:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 258:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;_LOCalc_DocClose($oCalcDoc, False)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;_LOCalc_DocClose($oCalcDoc, False)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Close the Calc Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Close the Calc Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;; Terminate the LibreOffice Process if no instances are still open.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;_LO_Terminate()&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &quot;Error&quot;, &quot;Failed to Terminate the LibreOffice instance. Error:&quot; &amp;amp; @error &amp;amp; &quot; Extended:&quot; &amp;amp; @extended &amp;amp; &quot; On Line: &quot; &amp;amp; @ScriptLineNumber)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>MLipok</name></author>
	</entry>
	<entry>
		<id>https://www.autoitscript.com/w/index.php?title=LibreOffice-Examples&amp;diff=15260&amp;oldid=prev</id>
		<title>Water: Created page with &quot;==Getting Started Examples== ===Quickstart: Base===  &lt;syntaxhighlight lang=&quot;autoit&quot;&gt; #include &lt;MsgBoxConstants.au3&gt; #include &lt;File.au3&gt;  #include &quot;LibreOfficeBase.au3&quot;  ; Create a New, visible, Blank Libre Office Document. Global $oDoc = _LOBase_DocCreate(True, False) If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &quot;Error&quot;, &quot;Failed to Create a new Base Document. Error:&quot; &amp; @error &amp; &quot; Extended:&quot; &amp; @extended &amp; &quot; On Line: &quot; &amp; @ScriptLineNumber)  ; Set the Da...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.autoitscript.com/w/index.php?title=LibreOffice-Examples&amp;diff=15260&amp;oldid=prev"/>
		<updated>2026-02-23T15:52:27Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Getting Started Examples== ===Quickstart: Base===  &amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt; #include &amp;lt;MsgBoxConstants.au3&amp;gt; #include &amp;lt;File.au3&amp;gt;  #include &amp;quot;LibreOfficeBase.au3&amp;quot;  ; Create a New, visible, Blank Libre Office Document. Global $oDoc = _LOBase_DocCreate(True, False) If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Create a new Base Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)  ; Set the Da...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Getting Started Examples==&lt;br /&gt;
===Quickstart: Base===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;File.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;LibreOfficeBase.au3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
; Create a New, visible, Blank Libre Office Document.&lt;br /&gt;
Global $oDoc = _LOBase_DocCreate(True, False)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Create a new Base Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Set the Database type.&lt;br /&gt;
_LOBase_DocDatabaseType($oDoc)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Set Base Document Database type. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Create a unique file name&lt;br /&gt;
Global $sSavePath = _TempFile(@DesktopDir &amp;amp; &amp;quot;\&amp;quot;, &amp;quot;BaseDocTestFile_&amp;quot;, &amp;quot;.odb&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
; Save The Base Document To Desktop Directory.&lt;br /&gt;
_LOBase_DocSaveAs($oDoc, $sSavePath)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to save the Base Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the Database Object.&lt;br /&gt;
$oDBase = _LOBase_DatabaseGetObjByDoc($oDoc)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Retrieve the Base Document Database Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Connect to the Database&lt;br /&gt;
$oConnection = _LOBase_DatabaseConnectionGet($oDBase)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to create a connection to the Database. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Add a Table to the Database.&lt;br /&gt;
_LOBase_TableAdd($oConnection, &amp;quot;tblNew_Table&amp;quot;, &amp;quot;Col1&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to add a table to the Database. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Close the connection.&lt;br /&gt;
_LOBase_DatabaseConnectionClose($oConnection)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to close a connection to the Database. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Save the changes to the document.&lt;br /&gt;
_LOBase_DocSave($oDoc)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Save the Base Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Close the Base Document.&lt;br /&gt;
_LOBase_DocClose($oDoc, False)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Close the Base Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Quickstart: Calc===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;File.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;LibreOfficeCalc.au3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
; Create a New, visible, Blank Libre Office Document.&lt;br /&gt;
Global $oDoc = _LOCalc_DocCreate(True, False)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Create a new Calc Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the presently active Sheet.&lt;br /&gt;
Global $oSheet = _LOCalc_SheetGetActive($oDoc)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the currently active Sheet Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the Object for Cell B1.&lt;br /&gt;
Global $oCell = _LOCalc_RangeGetCellByName($oSheet, &amp;quot;B1&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve B1 Cell Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Set Cell B1&amp;#039;s Text.&lt;br /&gt;
_LOCalc_CellString($oCell, &amp;quot;Sales&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Set B1 Cell content. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the Object for Cell B2.&lt;br /&gt;
$oCell = _LOCalc_RangeGetCellByName($oSheet, &amp;quot;B2&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve B2 Cell Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Set B2 Cell Value to 50&lt;br /&gt;
_LOCalc_CellValue($oCell, 50)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Set B2 Cell content. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the Object for Cell B3.&lt;br /&gt;
$oCell = _LOCalc_RangeGetCellByName($oSheet, &amp;quot;B3&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve B3 Cell Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Set B3 Cell Value to 15.50&lt;br /&gt;
_LOCalc_CellValue($oCell, 15.50)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Set B3 Cell content. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the Object for Cell A5.&lt;br /&gt;
$oCell = _LOCalc_RangeGetCellByName($oSheet, &amp;quot;A5&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve A5 Cell Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Set Cell A5&amp;#039;s Text.&lt;br /&gt;
_LOCalc_CellString($oCell, &amp;quot;Total&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Set B1 Cell content. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the Object for Cell B5.&lt;br /&gt;
$oCell = _LOCalc_RangeGetCellByName($oSheet, &amp;quot;B5&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve A5 Cell Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Set the Formula for Cell B5&lt;br /&gt;
_LOCalc_CellFormula($oCell, &amp;quot;=SUM(B2:B3)&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Set Cell B5 Formula. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Create a unique file name&lt;br /&gt;
Global $sSavePath = _TempFile(@DesktopDir &amp;amp; &amp;quot;\&amp;quot;, &amp;quot;CalcDocTestFile_&amp;quot;, &amp;quot;.ods&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
; Save The Calc Document To Desktop Directory.&lt;br /&gt;
_LOCalc_DocSaveAs($oDoc, $sSavePath)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to save the Calc Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Close the Calc Document.&lt;br /&gt;
_LOCalc_DocClose($oDoc, False)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Close the Calc Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Quickstart: Writer===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;File.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;LibreOfficeWriter.au3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
; Create a New, visible, Blank Libre Office Document.&lt;br /&gt;
Global $oDoc = _LOWriter_DocCreate(True, False)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Create a new Writer Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the visible document cursor (caret) to insert text with.&lt;br /&gt;
Global $oViewCursor = _LOWriter_DocGetViewCursor($oDoc)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the View Cursor Object for the Writer Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Insert some text at the ViewCursor.&lt;br /&gt;
_LOWriter_DocInsertString($oDoc, $oViewCursor, &amp;quot;Hello from LibreOffice, and AutoIt!&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to insert text. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Create a unique file name&lt;br /&gt;
Global $sSavePath = _TempFile(@DesktopDir &amp;amp; &amp;quot;\&amp;quot;, &amp;quot;DocTestFile_&amp;quot;, &amp;quot;.odt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
; Save The Document To Desktop Directory.&lt;br /&gt;
_LOWriter_DocSaveAs($oDoc, $sSavePath)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to save the Writer Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Close the document.&lt;br /&gt;
_LOWriter_DocClose($oDoc, False)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to close opened L.O. Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Starting Portable LibreOffice Example===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;autoit&amp;quot;&amp;gt;&lt;br /&gt;
#include &amp;lt;MsgBoxConstants.au3&amp;gt;&lt;br /&gt;
#include &amp;lt;File.au3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;LibreOffice_Helper.au3&amp;quot;&lt;br /&gt;
#include &amp;quot;LibreOfficeCalc.au3&amp;quot;&lt;br /&gt;
#include &amp;quot;LibreOfficeWriter.au3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
; Update this path to match the path to your Portable LibreOffice/OpenOffice folder.&lt;br /&gt;
Global $sPathToPortable = &amp;quot;C:\Portable Apps\LibreOfficePortablePrevious&amp;quot;&lt;br /&gt;
&lt;br /&gt;
; Initialize Portable LibreOffice&lt;br /&gt;
_LO_InitializePortable($sPathToPortable)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Initialize L.O. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Create a new Writer Document.&lt;br /&gt;
Global $oWriterDoc = _LOWriter_DocCreate(True, False)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Create a new Writer Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the visible document cursor (caret) to insert text with.&lt;br /&gt;
Global $oViewCursor = _LOWriter_DocGetViewCursor($oWriterDoc)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the View Cursor Object for the Writer Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Insert some text at the ViewCursor.&lt;br /&gt;
_LOWriter_DocInsertString($oWriterDoc, $oViewCursor, &amp;quot;Hello from LibreOffice, and AutoIt!&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to insert text. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Create a new Calc Document.&lt;br /&gt;
Global $oCalcDoc = _LOCalc_DocCreate(True, False)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Create a new Calc Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the presently active Sheet.&lt;br /&gt;
Global $oSheet = _LOCalc_SheetGetActive($oCalcDoc)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve the currently active Sheet Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the Object for Cell B1.&lt;br /&gt;
Global $oCell = _LOCalc_RangeGetCellByName($oSheet, &amp;quot;B1&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve B1 Cell Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Set Cell B1&amp;#039;s Text.&lt;br /&gt;
_LOCalc_CellString($oCell, &amp;quot;Sales&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Set B1 Cell content. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the Object for Cell B2.&lt;br /&gt;
$oCell = _LOCalc_RangeGetCellByName($oSheet, &amp;quot;B2&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve B2 Cell Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Set B2 Cell Value to 50&lt;br /&gt;
_LOCalc_CellValue($oCell, 50)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Set B2 Cell content. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the Object for Cell B3.&lt;br /&gt;
$oCell = _LOCalc_RangeGetCellByName($oSheet, &amp;quot;B3&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve B3 Cell Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Set B3 Cell Value to 15.50&lt;br /&gt;
_LOCalc_CellValue($oCell, 15.50)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Set B3 Cell content. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the Object for Cell A5.&lt;br /&gt;
$oCell = _LOCalc_RangeGetCellByName($oSheet, &amp;quot;A5&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve A5 Cell Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Set Cell A5&amp;#039;s Text.&lt;br /&gt;
_LOCalc_CellString($oCell, &amp;quot;Total&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Set B1 Cell content. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Retrieve the Object for Cell B5.&lt;br /&gt;
$oCell = _LOCalc_RangeGetCellByName($oSheet, &amp;quot;B5&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to retrieve A5 Cell Object. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Set the Formula for Cell B5&lt;br /&gt;
_LOCalc_CellFormula($oCell, &amp;quot;=SUM(B2:B3)&amp;quot;)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Set Cell B5 Formula. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Create a unique file name&lt;br /&gt;
Global $sSavePath = _TempFile(@DesktopDir &amp;amp; &amp;quot;\&amp;quot;, &amp;quot;WriterDocTestFile_&amp;quot;, &amp;quot;.odt&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
; Save The Writer Document To Desktop Directory.&lt;br /&gt;
_LOWriter_DocSaveAs($oWriterDoc, $sSavePath)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to save the Writer Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Create a unique file name&lt;br /&gt;
$sSavePath = _TempFile(@DesktopDir &amp;amp; &amp;quot;\&amp;quot;, &amp;quot;CalcDocTestFile_&amp;quot;, &amp;quot;.ods&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
; Save The Calc Document To Desktop Directory.&lt;br /&gt;
_LOCalc_DocSaveAs($oCalcDoc, $sSavePath)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to save the Calc Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Close the Writer document.&lt;br /&gt;
_LOWriter_DocClose($oWriterDoc, False)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to close opened L.O. Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&lt;br /&gt;
; Close the Calc Document.&lt;br /&gt;
_LOCalc_DocClose($oCalcDoc, False)&lt;br /&gt;
If @error Then Exit MsgBox($MB_OK + $MB_ICONERROR + $MB_TOPMOST, &amp;quot;Error&amp;quot;, &amp;quot;Failed to Close the Calc Document. Error:&amp;quot; &amp;amp; @error &amp;amp; &amp;quot; Extended:&amp;quot; &amp;amp; @extended &amp;amp; &amp;quot; On Line: &amp;quot; &amp;amp; @ScriptLineNumber)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Water</name></author>
	</entry>
</feed>