<?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[invoke ???]]></title><description><![CDATA[<p>hi Leute</p>
<p>Ich experimentere immer noch an meiner Office Automation<br />
und versuche erst einmal zu verstehen was dabei geschieht.<br />
Aber irgendwie blicke ich einfach nicht durch.Dabei benutze ich<br />
die Dateien von J.Kalmbach.</p>
<p>Invoke(LPDISPATCH pdisp,<br />
WORD wFlags,<br />
LPVARIANT pvRet,<br />
EXCEPINFO FAR* pexcepinfo,<br />
UINT FAR* pnArgErr,<br />
LPOLESTR pszName,<br />
LPCTSTR pszFmt,<br />
...)</p>
<p>so möchte ich zB nachfolgende Zeile rechtsbündig schreiben</p>
<pre><code class="language-cpp">Invoke(pdispWord, DISPATCH_METHOD, NULL, NULL, NULL, 
    OLESTR(&quot;ParagraphFormat.Alignment&quot;), TEXT(&quot;s&quot;),CT2OLE
    (&quot;wdAlignParagraphLeft&quot;));
</code></pre>
<p>Aufruf der Methode <em>ParagraphFormat.Alignment</em><br />
Parameter format ist ein String darum <em>TEXT(&quot;s&quot;)</em><br />
Parameter ist <em>wdAlignParagraphLeft</em>aber irgendwie klappt das nicht</p>
<p>Danke für jede Hilfe<br />
Gruß Linus</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/150067/invoke</link><generator>RSS for Node</generator><lastBuildDate>Wed, 22 Jul 2026 13:45:05 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/150067.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 12 Jun 2006 19:33:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to invoke ??? on Mon, 12 Jun 2006 19:33:34 GMT]]></title><description><![CDATA[<p>hi Leute</p>
<p>Ich experimentere immer noch an meiner Office Automation<br />
und versuche erst einmal zu verstehen was dabei geschieht.<br />
Aber irgendwie blicke ich einfach nicht durch.Dabei benutze ich<br />
die Dateien von J.Kalmbach.</p>
<p>Invoke(LPDISPATCH pdisp,<br />
WORD wFlags,<br />
LPVARIANT pvRet,<br />
EXCEPINFO FAR* pexcepinfo,<br />
UINT FAR* pnArgErr,<br />
LPOLESTR pszName,<br />
LPCTSTR pszFmt,<br />
...)</p>
<p>so möchte ich zB nachfolgende Zeile rechtsbündig schreiben</p>
<pre><code class="language-cpp">Invoke(pdispWord, DISPATCH_METHOD, NULL, NULL, NULL, 
    OLESTR(&quot;ParagraphFormat.Alignment&quot;), TEXT(&quot;s&quot;),CT2OLE
    (&quot;wdAlignParagraphLeft&quot;));
</code></pre>
<p>Aufruf der Methode <em>ParagraphFormat.Alignment</em><br />
Parameter format ist ein String darum <em>TEXT(&quot;s&quot;)</em><br />
Parameter ist <em>wdAlignParagraphLeft</em>aber irgendwie klappt das nicht</p>
<p>Danke für jede Hilfe<br />
Gruß Linus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076537</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076537</guid><dc:creator><![CDATA[linus]]></dc:creator><pubDate>Mon, 12 Jun 2006 19:33:34 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Mon, 12 Jun 2006 19:40:33 GMT]]></title><description><![CDATA[<p>Die Methode heisst mit Sicherheit *nicht* so!<br />
Du musst AFAIK zuerst das IDispathc-Interface von &quot;ParagraphFormat&quot; holen und dann dort das &quot;Alignment&quot; Property setzen (aber nicht auf einen String sondern auf eine Zahl).<br />
Schau Dir doch mal am besten die tlb-Datei von Word an, dann sollte es eigentlich deutlich werden...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076542</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076542</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Mon, 12 Jun 2006 19:40:33 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Mon, 12 Jun 2006 19:58:14 GMT]]></title><description><![CDATA[<p>Danke für die Antwort</p>
<p>Habe NULL Ahnung von Wordbasic,<br />
daher habe ich es über die Makros in Word versucht<br />
aber das scheint dann doch etwas anders zu gehen</p>
<p>Was meinst Du mit tlb-datei von Word ??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076551</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076551</guid><dc:creator><![CDATA[linus]]></dc:creator><pubDate>Mon, 12 Jun 2006 19:58:14 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Mon, 12 Jun 2006 20:25:20 GMT]]></title><description><![CDATA[<p>linus schrieb:</p>
<blockquote>
<p>Was meinst Du mit tlb-datei von Word ??</p>
</blockquote>
<p>Rufe OleView.exe (im Common7\bin-Verzeichnis von VS) auf und schau Dir unter &quot;Type Libraries&quot; das &quot;Microsoft Word x.x Objet Library&quot; an (doppel-click).<br />
Das kopierst Du Dir dann raus, druckst es aus und hängst es Dir an die Wand. Dann sieht Du z.B. dass wdAlignParagraphLeft dem Wert 0 entspricht. Und das &quot;ParagraphFormat&quot; ein IDispatch-Objekt zurückliefert...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076563</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076563</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Mon, 12 Jun 2006 20:25:20 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Mon, 12 Jun 2006 20:59:12 GMT]]></title><description><![CDATA[<p>Das ist ja toll</p>
<p>Gibt es eigentlich eine gute Literatur zu diesem Thema<br />
Meine Bücher schweigen sich zu diesem Thema aus</p>
<p>Danke<br />
Gruß Linus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076567</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076567</guid><dc:creator><![CDATA[linus]]></dc:creator><pubDate>Mon, 12 Jun 2006 20:59:12 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Tue, 13 Jun 2006 04:43:08 GMT]]></title><description><![CDATA[<p>Ich kann auch nur bei amazon suchen... selber hab ich keines...<br />
<a href="http://www.amazon.de/exec/obidos/ASIN/0735612420/ref=si_1_1/302-0334205-1208028" rel="nofollow">http://www.amazon.de/exec/obidos/ASIN/0735612420/ref=si_1_1/302-0334205-1208028</a></p>
<p>Nur noch als Ergänzung: Late-Binding ist schon der richtige Weg für Office-Automation (man könnte ja auch early Binding machen):<br />
INFO: Use DISPID Binding to Automate Office Applications Whenever Possible<br />
<a href="http://support.microsoft.com/kb/247579/EN-US/" rel="nofollow">http://support.microsoft.com/kb/247579/EN-US/</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076628</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076628</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 13 Jun 2006 04:43:08 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Tue, 13 Jun 2006 05:35:40 GMT]]></title><description><![CDATA[<p>Oder man macht es in C# und spart sich einen Haufen &quot;Ärger&quot;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076636</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076636</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Tue, 13 Jun 2006 05:35:40 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Tue, 13 Jun 2006 05:59:14 GMT]]></title><description><![CDATA[<p>Was soll da der grosse Unterschied sein??? Late-Binding ist in C# fast genau gleich wie in C++... IMHO sogar nich schlimmer...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076647</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076647</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 13 Jun 2006 05:59:14 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Tue, 13 Jun 2006 07:50:48 GMT]]></title><description><![CDATA[<p>Es ist einfach netter handzuhaben <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Ich finde es echt übel in C++ mit COM rumzumachen, macht einfach keinen Spaß das zu programmieren, ständig diese Umwandelei und so.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076690</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076690</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Tue, 13 Jun 2006 07:50:48 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Tue, 13 Jun 2006 09:53:09 GMT]]></title><description><![CDATA[<p>Jochen Kalmbach schrieb:</p>
<blockquote>
<p>Nur noch als Ergänzung: Late-Binding ist schon der richtige Weg für Office-Automation (man könnte ja auch early Binding machen):</p>
</blockquote>
<p>Danke für die Links</p>
<p>Ich habe es vorher mit early binding versucht jedoch gibt es ein Problem<br />
wenn das Programm auf verschiedenen Rechnern installiert wird, da ich nicht weis<br />
welche Office-Version implementiert ist. Ich glaube sogar , dass einige<br />
noch Office 95 oä. haben .</p>
<p>btw Bis zu welcher Ofice Version funktioniert der o.g. Ansatz des late Bindings eingentlich ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076771</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076771</guid><dc:creator><![CDATA[linus]]></dc:creator><pubDate>Tue, 13 Jun 2006 09:53:09 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Tue, 13 Jun 2006 14:38:22 GMT]]></title><description><![CDATA[<p>dEUs schrieb:</p>
<blockquote>
<p>Es ist einfach netter handzuhaben <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Ich finde es echt übel in C++ mit COM rumzumachen, macht einfach keinen Spaß das zu programmieren, ständig diese Umwandelei und so.</p>
</blockquote>
<p>Naja... es ist beides gleich blöd....</p>
<pre><code class="language-csharp">Type t = Type.GetTypeFromProgID(progID);
late = Activator.CreateInstance(t);
</code></pre>
<p>und<br />
das C++-Pedant sind doch sehr ähnlich...<br />
Auch</p>
<pre><code class="language-csharp">totalNoOfObjects = 0;
ParameterModifier pm = new ParameterModifier(2);
pm[0] = false;
pm[1] = true;
ParameterModifier [] pmArray = { pm };
object [] args = {(int) objectTyp, totalNoOfObjects};
object res = late.GetType().InvokeMember(
  &quot;StartObjectQuery&quot;, 
  BindingFlags.InvokeMethod, 
  null, 
  late, 
  args,
  pmArray, 
  null,
  null);
totalNoOfObjects = Convert.ToInt32(args[1]);
return Convert.ToBoolean(res);
</code></pre>
<p>Ist nicht sonderlich übersichtlicher...</p>
<p>Oder wie machst Du es in C#???????</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076939</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076939</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 13 Jun 2006 14:38:22 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Tue, 13 Jun 2006 14:39:37 GMT]]></title><description><![CDATA[<p>linus schrieb:</p>
<blockquote>
<p>btw Bis zu welcher Ofice Version funktioniert der o.g. Ansatz des late Bindings eingentlich ?</p>
</blockquote>
<p>Das Late-Binding-Ansatz funktioniert mit allen Windows-Office Versionen.<br />
Aus den von Dir beschriebenen Gründen ist es ja der Empfohlene Weg über Late-Binding zu gehen <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076940</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076940</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 13 Jun 2006 14:39:37 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Tue, 13 Jun 2006 14:41:29 GMT]]></title><description><![CDATA[<p>Ich füge das COM-Objekt als Referenz hinzu und benutze das ganze dann ganz normal wie jeden anderen Typ auch. Stichwort: Interop</p>
<p>Aber das ist wohl early-Binding, wenn mich nciht alles täuscht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076943</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076943</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Tue, 13 Jun 2006 14:41:29 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Tue, 13 Jun 2006 14:41:49 GMT]]></title><description><![CDATA[<p>dEUs schrieb:</p>
<blockquote>
<p>Ich füge das COM-Objekt als Referenz hinzu und benutze das ganze dann ganz normal wie jeden anderen Typ auch. Stichwort: Interop</p>
</blockquote>
<p>Und was hat das mit &quot;<strong>Late</strong>-Binding&quot; zu tun???<br />
Wenn Du das Objekt als Referenz hinzufügst, ist das IMHO Early-Binding...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076944</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076944</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Tue, 13 Jun 2006 14:41:49 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Tue, 13 Jun 2006 14:42:02 GMT]]></title><description><![CDATA[<p>Jochen Kalmbach schrieb:</p>
<blockquote>
<p>dEUs schrieb:</p>
<blockquote>
<p>Ich füge das COM-Objekt als Referenz hinzu und benutze das ganze dann ganz normal wie jeden anderen Typ auch. Stichwort: Interop</p>
</blockquote>
<p>Und was hat das mit &quot;<strong>Late</strong>-Binding&quot; zu tun???</p>
</blockquote>
<p>Jaja, habs ja auch grad gemerkt (siehe mein edit) <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f921.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--clown_face"
      title=":clown:"
      alt="🤡"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1076945</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1076945</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Tue, 13 Jun 2006 14:42:02 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Thu, 15 Jun 2006 12:29:03 GMT]]></title><description><![CDATA[<p>Sorry ! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /> Ich blick immer noch nicht richtig durch.</p>
<p>Jochen Kalmbach schrieb:</p>
<blockquote>
<p>Du musst AFAIK zuerst das IDispathc-Interface von &quot;ParagraphFormat&quot; holen und dann dort das &quot;Alignment&quot; Property setzen (aber nicht auf einen String sondern auf eine Zahl).</p>
</blockquote>
<p>Ich habe folgendes unter Microsoft Word im OleView gefunden:</p>
<pre><code>pdispinterface _ParagraphFormat
</code></pre>
<p>darunter<br />
methods: Alignment :</p>
<pre><code>[id(0x00000065), proput , helpcontext(0x09530065)]
           void Alignment([in] WdParagraphAlignment rhs);
</code></pre>
<pre><code>typedef enum {
        wdAlignParagraphLeft = 0,
        wdAlignParagraphCenter = 1,
        wdAlignParagraphRight = 2,
        wdAlignParagraphJustify = 3,
        wdAlignParagraphDistribute = 4,
        wdAlignParagraphJustifyMed = 5,
        wdAlignParagraphJustifyHi = 7,
        wdAlignParagraphJustifyLow = 8,
        wdAlignParagraphThaiJustify = 9
    } WdParagraphAlignment;
</code></pre>
<p>Wenn Du sagst IDispatch-inteface holen verstehe ich folgendes:</p>
<pre><code class="language-cpp">LPDISPATCH pdispFormat; 

		::CreateObject(OLESTR(&quot;_ParagraphFormat&quot;), &amp;pdispFormat);
</code></pre>
<p>Dabei erstelle ich doch eine neues COM-SchnittstellenObjekt.<br />
Andererseits denke ich doch , dass du über WordBasic Word steuern möchtest</p>
<p>weiter müsste ich dann mit invoke die Methode Alignment (DISPATCH_METHOD)aufrufen?<br />
und dann die Parameter setzen (DISPATCH_PROPERTYPUT) WdParagraphAlignment=0 (für left)</p>
<p>Irgendwie denke ich z Zt völlig daneben und liege wahrscheinlich auch völlig falsch.</p>
<p>PS Ich habe dazu in einem Buch ein Kapitel über Com und automatisierung gelesen. Danach war ich reichlich benebelt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1078079</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078079</guid><dc:creator><![CDATA[linus]]></dc:creator><pubDate>Thu, 15 Jun 2006 12:29:03 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Thu, 15 Jun 2006 15:39:22 GMT]]></title><description><![CDATA[<p>Mit meinem Satz habe ich gemeint:<br />
- via Invoke mit PROPERY_GET die Methode &quot;ParagraphFormat&quot; aufrufen; dann bekommst Du ein IDispatch-Interface zurück, welches Du bei dem *nächsten* Aufruf von Invoke verwendest (hier hast Du ja &quot;pdispWord&quot; verwendet)<br />
- Jetzt mit dem zurückgegebenen IDispatch-Interfave wieder via Invoke und PROPERTY_PUT mit dem Namen &quot;Alignment&quot; z.B. den Wert 2 (wdAlignParagraphRight) aufrufen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1078307</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078307</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 15 Jun 2006 15:39:22 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Thu, 15 Jun 2006 19:17:28 GMT]]></title><description><![CDATA[<p>Sei mir nicht böse aber ich sehe nicht wo ich ein IDispatch-Interface<br />
über Invoke zurückbekomme.</p>
<pre><code>/* 
 * Invoke 
 * 
 * Purpose: 
 *  Invokes a property accessor function or method of an automation object. Uses Unicode with OLE. 
 * 
 * Parameters: 
 *  pdisp         IDispatch* of automation object. 
 *  wFlags        Specfies if property is to be accessed or method to be invoked. 
 *                Can hold DISPATCH_PROPERTYGET, DISPATCH_PROPERTYPUT, DISPATCH_METHOD, 
 *                DISPATCH_PROPERTYPUTREF or DISPATCH_PROPERTYGET|DISPATCH_METHOD.    
 *  pvRet         NULL if caller excepts no result. Otherwise returns result. 
 *  pexcepinfo    Returns exception info if DISP_E_EXCEPTION is returned. Can be NULL if 
 *                caller is not interested in exception information.  
 *  pnArgErr      If return is DISP_E_TYPEMISMATCH, this returns the index (in reverse 
 *                order) of argument with incorrect type. Can be NULL if caller is not interested 
 *                in this information.  
 *  pszName       Name of property or method. 
 *  pszFmt        Format string that describes the variable list of parameters that  
 *                follows. The format string can contain the follwoing characters. 
 *                &amp; = mark the following format character as VT_BYREF  
 *                b = VT_BOOL 
 *                i = VT_I2 
 *                I = VT_I4 
 *                r = VT_R2 
 *                R = VT_R4 
 *                c = VT_CY  
 *                s = VT_BSTR (far string pointer can be passed, BSTR will be allocated by this function). 
 *                e = VT_ERROR 
 *                d = VT_DATE 
 *                v = VT_VARIANT. Use this to pass data types that are not described in  
 *                                the format string. (For example SafeArrays). 
 *                D = VT_DISPATCH 
 *                U = VT_UNKNOWN 
 *     
 *  ...           Arguments of the property or method. Arguments are described by pszFmt.   
 *                ****FAR POINTERS MUST BE PASSED FOR POINTER ARGUMENTS in Win16.**** 
 * Return Value: 
 *  HRESULT indicating success or failure         
 *
</code></pre>
<p>Rückgabewert von Invoke ist HRESULT<br />
und der einzige Parameter der einen Wert zurückgibt ist pvRet<br />
der ist jedoch vom Typ VARIANT .</p>
<p>Tut mir ja leid aber ich sehe das einfach nicht .<br />
(im Voraus: Danke für Deine Geduld <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /> )</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1078486</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078486</guid><dc:creator><![CDATA[linus]]></dc:creator><pubDate>Thu, 15 Jun 2006 19:17:28 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Thu, 15 Jun 2006 19:24:24 GMT]]></title><description><![CDATA[<p>Na, vermutlich in</p>
<pre><code>*  pvRet         NULL if caller excepts no result. Otherwise returns result.
</code></pre>
<p>Simples Beispiel:</p>
<pre><code class="language-cpp">LPDISPATCH pdispParagraphFormat;
  HRESULT hrRes;
  VARIANT vRet;
  VariantInit(&amp;vRet);
  hrRes = Invoke(pdispWord, DISPATCH_PROPERTYGET, &amp;vRet, NULL, NULL, 
    OLESTR(&quot;ParagraphFormat&quot;), NULL);
  if FAILED(hrRes)
    return hrRes;
  if (V_VT(&amp;vRet) != VT_DISPATCH)
    return E_FAIL;
  *ppdispRoot = V_DISPATCH(&amp;vRet);
  if ((*ppdispRoot) == NULL)
    return E_FAIL;
  pdispParagraphFormat-&gt;AddRef();  // keep a reference to the object
  VariantClear(&amp;vRet);

  // Now use this object to do the Invoke for &quot;Alignment&quot;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1078489</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078489</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Thu, 15 Jun 2006 19:24:24 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Thu, 15 Jun 2006 20:55:58 GMT]]></title><description><![CDATA[<p>Danke für den Source. Ich glaub langsam komme ich dahinter.</p>
<p>Jedoch habe ich doch noch ein paar Fragen und Probleme</p>
<ol>
<li></li>
</ol>
<pre><code class="language-cpp">VARIANT vRet;
VariantInit(&amp;vRet); 
hrRes = Invoke(pdispWord, DISPATCH_PROPERTYGET, &amp;vRet, NULL, NULL,OLESTR(&quot;ParagraphFormat&quot;), NULL);
</code></pre>
<p>Wenn ich es so ausführe bekomme ich nichts zurück<br />
vRet={VT_EMPTY}<br />
Wahrscheinlich ist &quot;ParagraphFormat&quot; bzw &quot;_ParagraphFormat&quot; nicht korrekt.<br />
Habe beides ausprobiert.</p>
<ol start="2">
<li></li>
</ol>
<p>Wenn ich das richtig verstehe muss ich doch</p>
<pre><code class="language-cpp">LPDISPATCH *ppdispRoot;
</code></pre>
<p>deklarieren?</p>
<ol start="3">
<li></li>
</ol>
<p>Nachhilfe in c++ <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /><br />
Wie mmuss ich</p>
<pre><code class="language-cpp">*ppdispRoot = V_DISPATCH(&amp;vRet);
  if ((*ppdispRoot) == NULL)
    return E_FAIL;
  pdispParagraphFormat-&gt;AddRef();  // keep a reference to the object
  VariantClear(&amp;vRet)
</code></pre>
<p>verstehen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1078542</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078542</guid><dc:creator><![CDATA[linus]]></dc:creator><pubDate>Thu, 15 Jun 2006 20:55:58 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Fri, 16 Jun 2006 05:22:38 GMT]]></title><description><![CDATA[<p>Hab den Source von einem bestehenden Projekt zusammenkopiert... musst Dur *ppdispRoot durch pdispParagraphFormat ersetzen:</p>
<pre><code class="language-cpp">pdispParagraphFormat = V_DISPATCH(&amp;vRet);
  if (pdispParagraphFormat == NULL)
    return E_FAIL;
  pdispParagraphFormat-&gt;AddRef();  // keep a reference to the object
  VariantClear(&amp;vRet)
</code></pre>
<p>Hab es nicht wirklich mit Word getestet...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1078621</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078621</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 16 Jun 2006 05:22:38 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Fri, 16 Jun 2006 10:18:57 GMT]]></title><description><![CDATA[<p>Danke für Deine Hilfe<br />
Ich denke ich blicke jetz ein wenig mehr durch.</p>
<p>Nur habe ich zZt keinen Schimmer warum Invoke kein entsprechendes Ergebnis liefert.<br />
ICh kann mir nur vorstellen, dass ich die falschen Argumente übergebe.</p>
<p>Aber es ist doch richtig , dass ich die Bezeichnungen der Interfaces übergeben<br />
muss. Ich habe jetzt verschiedene Nezeichnungen für entsprechende Interfaces<br />
übergeben , jedoch immmer mit dem gleichen Ergebnis.</p>
<p>Zum Verständnis:<br />
Ich suche unter type libraries nach</p>
<pre><code>-&gt;Microsoft Word 11.0 Object library &lt;8.3&gt;
</code></pre>
<p>darunter finde ich diverse Interfaces</p>
<pre><code>-&gt;_Application
         _ParagraphFormat
         _Fonts
         Range
         Character
etc
</code></pre>
<p>und ich denke für diese muß ich doch ein IDspatch erhalten um dann<br />
auf die entsprechendem Methoden zugreifen zu können</p>
<p>Oder nennen sich diese Schnittstellen bzgl VBA ganz anders ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1078751</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078751</guid><dc:creator><![CDATA[linus]]></dc:creator><pubDate>Fri, 16 Jun 2006 10:18:57 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Fri, 16 Jun 2006 10:42:25 GMT]]></title><description><![CDATA[<p>Du musst Methoden oder Properties aufrufen. Wie die Klasse heisst die Du da zurückbekommst oder verwendest spielt dabei *keine* Rolle!<br />
Und Werte doch einfach den HRESULT-Rückgabewert aus, dann kommst Du am schnellsten drauf was schief geht...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1078760</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078760</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Fri, 16 Jun 2006 10:42:25 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Fri, 16 Jun 2006 11:04:49 GMT]]></title><description><![CDATA[<p>das ist es ja<br />
hrRes = 0x80020006 unbekannter Name.<br />
vRet = {VT_EMPTY}</p>
<p>jedesmal (!seufz)</p>
<p>Was ist mit pexcepinfo oder pnArgErr bei Invoke<br />
liefern diese Parameter mirt vielleich Infos?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1078773</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1078773</guid><dc:creator><![CDATA[linus]]></dc:creator><pubDate>Fri, 16 Jun 2006 11:04:49 GMT</pubDate></item><item><title><![CDATA[Reply to invoke ??? on Sat, 17 Jun 2006 15:12:56 GMT]]></title><description><![CDATA[<p>Heureka , ich hab's <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>vergiss es mit IDispatch holen etc.</p>
<p>Ich hatte die ganze Zeit Visual Basic und Wordbasic gleichgesetzt.</p>
<p>es reicht einfach dei Wordbasic Methode aufzurufen : <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f4a1.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--light_bulb"
      title=":bulb:"
      alt="💡"
    /> (auf Englisch)</p>
<pre><code class="language-cpp">Invoke(pdispWord, DISPATCH_METHOD, NULL, NULL, NULL,   
			OLESTR(&quot;RightPara&quot;), NULL);
</code></pre>
<p>eine Auflistung der Wordbasic-Methoden und entsprechenden VBA-Methoden<br />
habe ich hier gefunden:</p>
<p><a href="http://msdn.microsoft.com/library/en-us/vbawd11/html/wohowWordBasicEquivalentsA_HV05214104.asp?frame=true" rel="nofollow">http://msdn.microsoft.com/library/en-us/vbawd11/html/wohowWordBasicEquivalentsA_HV05214104.asp?frame=true</a></p>
<p>Trotzdem vielen Dank für die Hilfe . Es hat mir doch einige tiefere<br />
Einblicke in dieses Thema ermöglicht.</p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1079561</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1079561</guid><dc:creator><![CDATA[linus]]></dc:creator><pubDate>Sat, 17 Jun 2006 15:12:56 GMT</pubDate></item></channel></rss>