<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[COM-Bibliothek: Word-Dokument öffnen (IDispatch-Interface)]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte ein bestehendes Word-Dokument öffnen und reinschreiben.</p>
<p>Ein neues Dokument zu erstellen und dort reinzuschreiben, klappt auch soweit. Möchte ich jedoch ein vorhandenes Dokument öffnen, kann ich leider nicht reinschreiben. Mir sind die Funktionen, die dafür nötig sind, nicht ganz klar.</p>
<p>Mein Code zur Initialisierung der Word-Komponente.</p>
<pre><code class="language-cpp">//Instanz von Word gestartet, Pointer pAppInt zum IUnknown-Interface von Word (Zugriff auf Funktionen möglich)
   m_officeInstance = ::CoCreateInstance(clsid, NULL, CLSCTX_SERVER, IID_IUnknown, (void**) &amp;m_punknownapp);

   //IUnknown-Pointer punknownapp wird auf Dispatch-Pointer pdispapp umgelegt
   m_officeInstance = m_punknownapp-&gt;QueryInterface(IID_IDispatch, (void**)&amp;m_pdispapp);
   // --- Zugriff auf das Application Objekt herstellen ---
   //IDispatch* für Dokumenteneigenschaften
   m_szFunction = OLESTR(&quot;Documents&quot;);
   //Mappen der Argumente des Application Objekts für Invoke
   m_officeInstance = m_pdispapp-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_Docs);
   //Zugriff zu den Methoden herstellen
   m_officeInstance = m_pdispapp-&gt;Invoke(m_dispid_Docs, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &amp;dpNoArgs, &amp;m_vResult, NULL, NULL);
   //Dokumenteneigenschaften von Invoke über vResult übernehmen
   m_pdispdocs = m_vResult.pdispVal;
</code></pre>
<p>Nun versuche ich, auf ein bestehendes Dokument mit &quot;Open&quot; zuzugreifen und mit &quot;TypeText&quot; was reinzuschreiben. Sichern möchte ich es mit &quot;SaveAs&quot;, was aber leider nicht klappt.</p>
<p>Hier der Code dazu:</p>
<pre><code class="language-cpp">//--- lokale Variablen ---
   QString eigeneDateien;
   QString fileNameLoad;
   VARIANT vFileName;
   //DISPPARAMS dpFileOpen;
   DISPPARAMS dpNoArgs = {NULL, NULL, 0, 0};
   BSTR bstr_FileName;
   //testweise mal rausgenommen
   //BSTR bstr_PassWord;
   //nur für Schreibtest
   BSTR bstr_Eingabe;
   VARIANT vArgsTypeText[1];
   DISPPARAMS dpTypeText;
   BSTR bstr_EmptyString;

   //TO DO: noch buggy, stürzt ab nach geöffnetem Dokument
   //eigene Dateien: Dateipfad des aktuellen Benutzers
   eigeneDateien = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
   fileNameLoad = QFileDialog::getOpenFileName(0, tr(&quot;Dateiname wählen&quot;), eigeneDateien, tr(&quot;Dokumente (*.doc)&quot;));
   if (fileNameLoad.length() &gt; 0) {
      bstr_FileName = RSQStringToBSTR(fileNameLoad);
      vFileName.vt = VT_BSTR;
      vFileName.bstrVal = ::SysAllocString(bstr_FileName);
      DISPPARAMS dpFileOpen = {&amp;vFileName, NULL, 1, 0};
      //dpFileOpen.rgvarg = vFileName;
      //dpFileOpen.cNamedArgs = 0;

      //--- Zugriff auf Document Objekt herstellen ---
      m_szFunction = OLESTR(&quot;Open&quot;);
      //Mappen der Argumente des Dokumenten Objekts für Invoke
      m_officeInstance = m_pdispdocs-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_DocsAdd);
      //Zugriff zu den Methoden herstellen
      m_officeInstance = m_pdispdocs-&gt;Invoke(m_dispid_DocsAdd, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &amp;dpFileOpen, &amp;m_vResult, NULL, NULL);
      m_pdispsel = m_vResult.pdispVal;

      //Dokumenteneigenschaften
      m_szFunction = OLESTR(&quot;Item&quot;);
      m_officeInstance = m_pdispdocs-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_Sel);
      m_officeInstance = m_pdispdocs-&gt;Invoke(m_dispid_Sel, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &amp;dpFileOpen, &amp;m_vResult, NULL, NULL);
      //m_pdispactivedoc = m_vResult.pdispVal;

      //--- Zugriff auf Selection Objekt herstellen ---
      m_szFunction = OLESTR(&quot;Selection&quot;);
      //Mappen der Argumente des Selection Objekts für Invoke
      m_officeInstance = m_pdispapp-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_Sel);
      //Zugriff zu den Methoden herstellen
      m_officeInstance = m_pdispapp-&gt;Invoke(m_dispid_Sel, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &amp;dpFileOpen, &amp;m_vResult, NULL, NULL);
      //Argumente von Invoke über m_vResult übernehmen
      //m_pdispactivedoc = m_vResult.pdispVal;

      //Aktives Dokument ansteuern
      m_szFunction = OLESTR(&quot;ActiveDocument&quot;);
      m_officeInstance = m_pdispapp-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_ActiveDoc);
      m_officeInstance = m_pdispapp-&gt;Invoke(m_dispid_ActiveDoc, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &amp;dpFileOpen, &amp;m_vResult, NULL, NULL);
      m_pdispactivedoc = m_vResult.pdispVal;

      //--- Test: Schreiben ins geöffnete Dokument ---
      //DISP_IDs on TypeText und TypeParagraph,
      m_szFunction = OLESTR(&quot;TypeText&quot;);
      m_officeInstance = m_pdispsel-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_TypeText);
      m_szFunction = OLESTR(&quot;TypeParagraph&quot;);
      m_officeInstance = m_pdispsel-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_TextPara);
      //TypeTextMethode hat ein Argument - mit VARIANT-Datentyp festlegen
      bstr_Eingabe = SysAllocString(OLESTR(&quot;Dokument geladen&quot;));
      vArgsTypeText[0].vt = VT_BSTR;
      vArgsTypeText[0].bstrVal = bstr_Eingabe;
      dpTypeText.cArgs = 1;
      dpTypeText.rgvarg = vArgsTypeText;
      dpTypeText.cNamedArgs = 0;
      bstr_EmptyString = ::SysAllocString(OLESTR(&quot;&quot;));

      //Texteingabe
      m_officeInstance = m_pdispsel-&gt;Invoke(m_dispid_TypeText, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &amp;dpTypeText, NULL, NULL, NULL);
      //--- Test Ende ---

      //DISPPARAMS erstellen, damit Word-Dokument erstellt werden kann
      VARIANT vArgsSaveAs[11];
      DISPPARAMS dpSaveAs;
      VARIANT vFalse;
      dpSaveAs.cArgs = 11;
      dpSaveAs.cNamedArgs = 0;
      dpSaveAs.rgvarg = vArgsSaveAs;

      vFalse.vt = VT_BOOL;
      vFalse.boolVal = FALSE;

      //Testdoc
      //String-Conversion
      bstr_Eingabe = RSQStringToBSTR(fileNameLoad);
      //Dateiname
      vArgsSaveAs[10].vt = VT_BSTR;
      vArgsSaveAs[10].bstrVal = bstr_Eingabe;
      //Dateiformat
      vArgsSaveAs[9].vt = VT_I4;
      vArgsSaveAs[9].lVal = 0;
      //keine Kommentare
      vArgsSaveAs[8] = vFalse;
      //evtl. Passwort
      vArgsSaveAs[7].vt = VT_BSTR;
      vArgsSaveAs[7].bstrVal = bstr_EmptyString;
      //zu &quot;Recent Files dazufügen&quot;
      vArgsSaveAs[6].vt = VT_BOOL;
      vArgsSaveAs[6].boolVal = TRUE;
      vArgsSaveAs[5].vt = VT_BSTR;
      //Passwort schreiben
      vArgsSaveAs[5].bstrVal = bstr_EmptyString;
      //ReadOnly
      vArgsSaveAs[4] = vFalse;
      //TrueTypeFormats embedding
      vArgsSaveAs[3] = vFalse;
      //Picture Format
      vArgsSaveAs[2] = vFalse;
      //Save FormsData
      vArgsSaveAs[1] = vFalse;
      //Save as OCE-Letter
      vArgsSaveAs[0] = vFalse;

      m_szFunction = OLESTR(&quot;SaveAs&quot;);
      //Dokument sichern
      m_officeInstance = m_pdispactivedoc-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_SaveAs);
      m_officeInstance = m_pdispactivedoc-&gt;Invoke(m_dispid_SaveAs, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &amp;dpSaveAs, &amp;m_vResult, NULL, NULL);
</code></pre>
<p>Für Hilfe wäre ich sehr dankbar, da ich leider auch kaum Dokumentation zur Automatisierung von Word finde, habe mich auch schon durchs MSDN gewühlt.</p>
<p>Gruß,</p>
<p>Tobias</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/228376/com-bibliothek-word-dokument-öffnen-idispatch-interface</link><generator>RSS for Node</generator><lastBuildDate>Fri, 10 Apr 2026 13:10:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/228376.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 27 Nov 2008 13:42:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to COM-Bibliothek: Word-Dokument öffnen (IDispatch-Interface) on Thu, 27 Nov 2008 13:42:56 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>ich möchte ein bestehendes Word-Dokument öffnen und reinschreiben.</p>
<p>Ein neues Dokument zu erstellen und dort reinzuschreiben, klappt auch soweit. Möchte ich jedoch ein vorhandenes Dokument öffnen, kann ich leider nicht reinschreiben. Mir sind die Funktionen, die dafür nötig sind, nicht ganz klar.</p>
<p>Mein Code zur Initialisierung der Word-Komponente.</p>
<pre><code class="language-cpp">//Instanz von Word gestartet, Pointer pAppInt zum IUnknown-Interface von Word (Zugriff auf Funktionen möglich)
   m_officeInstance = ::CoCreateInstance(clsid, NULL, CLSCTX_SERVER, IID_IUnknown, (void**) &amp;m_punknownapp);

   //IUnknown-Pointer punknownapp wird auf Dispatch-Pointer pdispapp umgelegt
   m_officeInstance = m_punknownapp-&gt;QueryInterface(IID_IDispatch, (void**)&amp;m_pdispapp);
   // --- Zugriff auf das Application Objekt herstellen ---
   //IDispatch* für Dokumenteneigenschaften
   m_szFunction = OLESTR(&quot;Documents&quot;);
   //Mappen der Argumente des Application Objekts für Invoke
   m_officeInstance = m_pdispapp-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_Docs);
   //Zugriff zu den Methoden herstellen
   m_officeInstance = m_pdispapp-&gt;Invoke(m_dispid_Docs, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &amp;dpNoArgs, &amp;m_vResult, NULL, NULL);
   //Dokumenteneigenschaften von Invoke über vResult übernehmen
   m_pdispdocs = m_vResult.pdispVal;
</code></pre>
<p>Nun versuche ich, auf ein bestehendes Dokument mit &quot;Open&quot; zuzugreifen und mit &quot;TypeText&quot; was reinzuschreiben. Sichern möchte ich es mit &quot;SaveAs&quot;, was aber leider nicht klappt.</p>
<p>Hier der Code dazu:</p>
<pre><code class="language-cpp">//--- lokale Variablen ---
   QString eigeneDateien;
   QString fileNameLoad;
   VARIANT vFileName;
   //DISPPARAMS dpFileOpen;
   DISPPARAMS dpNoArgs = {NULL, NULL, 0, 0};
   BSTR bstr_FileName;
   //testweise mal rausgenommen
   //BSTR bstr_PassWord;
   //nur für Schreibtest
   BSTR bstr_Eingabe;
   VARIANT vArgsTypeText[1];
   DISPPARAMS dpTypeText;
   BSTR bstr_EmptyString;

   //TO DO: noch buggy, stürzt ab nach geöffnetem Dokument
   //eigene Dateien: Dateipfad des aktuellen Benutzers
   eigeneDateien = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
   fileNameLoad = QFileDialog::getOpenFileName(0, tr(&quot;Dateiname wählen&quot;), eigeneDateien, tr(&quot;Dokumente (*.doc)&quot;));
   if (fileNameLoad.length() &gt; 0) {
      bstr_FileName = RSQStringToBSTR(fileNameLoad);
      vFileName.vt = VT_BSTR;
      vFileName.bstrVal = ::SysAllocString(bstr_FileName);
      DISPPARAMS dpFileOpen = {&amp;vFileName, NULL, 1, 0};
      //dpFileOpen.rgvarg = vFileName;
      //dpFileOpen.cNamedArgs = 0;

      //--- Zugriff auf Document Objekt herstellen ---
      m_szFunction = OLESTR(&quot;Open&quot;);
      //Mappen der Argumente des Dokumenten Objekts für Invoke
      m_officeInstance = m_pdispdocs-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_DocsAdd);
      //Zugriff zu den Methoden herstellen
      m_officeInstance = m_pdispdocs-&gt;Invoke(m_dispid_DocsAdd, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &amp;dpFileOpen, &amp;m_vResult, NULL, NULL);
      m_pdispsel = m_vResult.pdispVal;

      //Dokumenteneigenschaften
      m_szFunction = OLESTR(&quot;Item&quot;);
      m_officeInstance = m_pdispdocs-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_Sel);
      m_officeInstance = m_pdispdocs-&gt;Invoke(m_dispid_Sel, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &amp;dpFileOpen, &amp;m_vResult, NULL, NULL);
      //m_pdispactivedoc = m_vResult.pdispVal;

      //--- Zugriff auf Selection Objekt herstellen ---
      m_szFunction = OLESTR(&quot;Selection&quot;);
      //Mappen der Argumente des Selection Objekts für Invoke
      m_officeInstance = m_pdispapp-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_Sel);
      //Zugriff zu den Methoden herstellen
      m_officeInstance = m_pdispapp-&gt;Invoke(m_dispid_Sel, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &amp;dpFileOpen, &amp;m_vResult, NULL, NULL);
      //Argumente von Invoke über m_vResult übernehmen
      //m_pdispactivedoc = m_vResult.pdispVal;

      //Aktives Dokument ansteuern
      m_szFunction = OLESTR(&quot;ActiveDocument&quot;);
      m_officeInstance = m_pdispapp-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_ActiveDoc);
      m_officeInstance = m_pdispapp-&gt;Invoke(m_dispid_ActiveDoc, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &amp;dpFileOpen, &amp;m_vResult, NULL, NULL);
      m_pdispactivedoc = m_vResult.pdispVal;

      //--- Test: Schreiben ins geöffnete Dokument ---
      //DISP_IDs on TypeText und TypeParagraph,
      m_szFunction = OLESTR(&quot;TypeText&quot;);
      m_officeInstance = m_pdispsel-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_TypeText);
      m_szFunction = OLESTR(&quot;TypeParagraph&quot;);
      m_officeInstance = m_pdispsel-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_TextPara);
      //TypeTextMethode hat ein Argument - mit VARIANT-Datentyp festlegen
      bstr_Eingabe = SysAllocString(OLESTR(&quot;Dokument geladen&quot;));
      vArgsTypeText[0].vt = VT_BSTR;
      vArgsTypeText[0].bstrVal = bstr_Eingabe;
      dpTypeText.cArgs = 1;
      dpTypeText.rgvarg = vArgsTypeText;
      dpTypeText.cNamedArgs = 0;
      bstr_EmptyString = ::SysAllocString(OLESTR(&quot;&quot;));

      //Texteingabe
      m_officeInstance = m_pdispsel-&gt;Invoke(m_dispid_TypeText, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &amp;dpTypeText, NULL, NULL, NULL);
      //--- Test Ende ---

      //DISPPARAMS erstellen, damit Word-Dokument erstellt werden kann
      VARIANT vArgsSaveAs[11];
      DISPPARAMS dpSaveAs;
      VARIANT vFalse;
      dpSaveAs.cArgs = 11;
      dpSaveAs.cNamedArgs = 0;
      dpSaveAs.rgvarg = vArgsSaveAs;

      vFalse.vt = VT_BOOL;
      vFalse.boolVal = FALSE;

      //Testdoc
      //String-Conversion
      bstr_Eingabe = RSQStringToBSTR(fileNameLoad);
      //Dateiname
      vArgsSaveAs[10].vt = VT_BSTR;
      vArgsSaveAs[10].bstrVal = bstr_Eingabe;
      //Dateiformat
      vArgsSaveAs[9].vt = VT_I4;
      vArgsSaveAs[9].lVal = 0;
      //keine Kommentare
      vArgsSaveAs[8] = vFalse;
      //evtl. Passwort
      vArgsSaveAs[7].vt = VT_BSTR;
      vArgsSaveAs[7].bstrVal = bstr_EmptyString;
      //zu &quot;Recent Files dazufügen&quot;
      vArgsSaveAs[6].vt = VT_BOOL;
      vArgsSaveAs[6].boolVal = TRUE;
      vArgsSaveAs[5].vt = VT_BSTR;
      //Passwort schreiben
      vArgsSaveAs[5].bstrVal = bstr_EmptyString;
      //ReadOnly
      vArgsSaveAs[4] = vFalse;
      //TrueTypeFormats embedding
      vArgsSaveAs[3] = vFalse;
      //Picture Format
      vArgsSaveAs[2] = vFalse;
      //Save FormsData
      vArgsSaveAs[1] = vFalse;
      //Save as OCE-Letter
      vArgsSaveAs[0] = vFalse;

      m_szFunction = OLESTR(&quot;SaveAs&quot;);
      //Dokument sichern
      m_officeInstance = m_pdispactivedoc-&gt;GetIDsOfNames(IID_NULL, &amp;m_szFunction, 1, LOCALE_USER_DEFAULT, &amp;m_dispid_SaveAs);
      m_officeInstance = m_pdispactivedoc-&gt;Invoke(m_dispid_SaveAs, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_PROPERTYGET, &amp;dpSaveAs, &amp;m_vResult, NULL, NULL);
</code></pre>
<p>Für Hilfe wäre ich sehr dankbar, da ich leider auch kaum Dokumentation zur Automatisierung von Word finde, habe mich auch schon durchs MSDN gewühlt.</p>
<p>Gruß,</p>
<p>Tobias</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1621801</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1621801</guid><dc:creator><![CDATA[Sir_Tobias]]></dc:creator><pubDate>Thu, 27 Nov 2008 13:42:56 GMT</pubDate></item><item><title><![CDATA[Reply to COM-Bibliothek: Word-Dokument öffnen (IDispatch-Interface) on Thu, 27 Nov 2008 14:04:19 GMT]]></title><description><![CDATA[<p>Der Code wird etwas unübersichtlich bei Dir... verwende doch den Wrapper von MS, dann kannst Du fast 1-zu-1 vorhandene VB-Beispiele umsetzen...<br />
Siehe: <a href="http://blog.kalmbachnet.de/?postid=63" rel="nofollow">http://blog.kalmbachnet.de/?postid=63</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1621822</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1621822</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 27 Nov 2008 14:04:19 GMT</pubDate></item><item><title><![CDATA[Reply to COM-Bibliothek: Word-Dokument öffnen (IDispatch-Interface) on Mon, 01 Dec 2008 11:47:33 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>vielen Dank für die Wrapper-Klasse, das war sehr hilfreich. Allerdings bekomme ich irgendwie Word noch nicht dazu, ein Dokument zu öffnen und testweise was reinzuschreiben. Word öffnet die Datei gar nicht, welche OLE-Funktion müßte ich noch aufrufen?</p>
<p>Hier noch mein Code dazu:</p>
<pre><code class="language-cpp">QString eigeneDateien;
   QString fileNameLoad;

   eigeneDateien = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
   fileNameLoad = QFileDialog::getOpenFileName(0, tr(&quot;Dateiname wählen&quot;), eigeneDateien, tr(&quot;Dokumente (*.doc)&quot;));
   BSTR bstr_fileNameLoad = RSQStringToBSTR(fileNameLoad);

   Invoke(pdispWord, DISPATCH_METHOD, NULL, NULL, NULL, OLESTR(&quot;Open&quot;), TEXT(&quot;s&quot;), bstr_fileNameLoad);
   Invoke(pdispWord, DISPATCH_METHOD, NULL, NULL, NULL, OLESTR(&quot;Insert&quot;), TEXT(&quot;s&quot;), (LPOLESTR)OLESTR(&quot;angefuegt&quot;));
   Invoke(pdispWord, DISPATCH_METHOD, NULL, NULL, NULL, OLESTR(&quot;FileSaveAs&quot;), TEXT(&quot;s&quot;), bstr_fileNameLoad);
</code></pre>
<p>Vielen Dank schon mal.</p>
<p>Gruß,</p>
<p>Tobias</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1623727</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1623727</guid><dc:creator><![CDATA[Sir_Tobias]]></dc:creator><pubDate>Mon, 01 Dec 2008 11:47:33 GMT</pubDate></item><item><title><![CDATA[Reply to COM-Bibliothek: Word-Dokument öffnen (IDispatch-Interface) on Thu, 04 Dec 2008 10:58:56 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>habe es gelöst, es darf nur die Funktion &quot;FileOpen&quot; sein, weder Item noch anderes darf darauf angewendet werden. Damit funktioniert es.</p>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/5675">@Jochen</a>: Danke für den Link mit den Wrapperklassen, das ist sehr hilfreich.</p>
<p>Viele Grüße,</p>
<p>Tobias</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1625349</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1625349</guid><dc:creator><![CDATA[Sir_Tobias]]></dc:creator><pubDate>Thu, 04 Dec 2008 10:58:56 GMT</pubDate></item></channel></rss>