andyah

CSharp Word läßt sich nicht fernsteuern Problem mit Word?

CSharp Word läßt sich nicht fernsteuern! trotz vorhandenem Verweis
(Problem mit Word?)

Hi NG,

ich habe ein Problem mit der Fernsteuerung von Word 2010 per VS 2008.

Fehlermeldung:

Das COM-Objekt des Typs "Microsoft.Office.Interop.Word.ApplicationClass" kann nicht in den Schnittstellentyp "Microsoft.Office.Interop.Word._Application" umgewandelt werden

Code:

using Word = Microsoft.Office.Interop.Word;

Word.Application wo;
wo = new Word.Application();

wo.Visible = true;

Wo liegt hier mein (Denk)Fehler?

Gruß
Andy
Auf Facebook teilen
Auf X (Twitter) teilen
Auf Reddit teilen
Auf Linkedin teilen

Content-ID: 179445

Url: https://administrator.de/forum/csharp-word-laesst-sich-nicht-fernsteuern-problem-mit-word-179445.html

Ausgedruckt am: 07.06.2025 um 12:06 Uhr

104596
104596 06.08.2012 um 11:21:17 Uhr
Goto Top
Hi Andy,

du hast vermutlich 2 Sachen vergessen.
Punkt 1: Du musst bei den Verweisen (engl. References) unter COM Microsoft.Office.Interop.Word hinzufügen.

Punkt 2:

Microsoft.Office.Interop.Word.Application wo;
wo = new Microsoft.Office.Interop.Word.Application();

wo.Visible = true;

so funktionierts face-smile

Viele Grüße,
Pat