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
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
Please also mark the comments that contributed to the solution of the article
Content-Key: 179445
Url: https://administrator.de/contentid/179445
Printed on: April 25, 2024 at 04:04 o'clock
1 Comment
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
Viele Grüße,
Pat
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
Viele Grüße,
Pat