Hi all,
I am having trouble with the Office Word API trying to create a Word documment throw the Interop libraries.
I have the following cod in AX:
Microsoft.Office.Interop.Word.ApplicationClass word;
Microsoft.Office.Interop.Word.Documents docs;
Microsoft.Office.Interop.Word.DocumentClass doc;
int i;
;
new InteropPermission(InteropKind::ClrInterop);
word = new Microsoft.Office.Interop.Word.ApplicationClass();
doc = new Microsoft.Office.Interop.Word.DocumentClass();
docs = word.get_Documents();
doc = docs.Add();
CodeAccessPermission::revertAssert();
It seems OK but the AX compiler throws an error in the line marked in red, saying that the Add function doesn't exists in the Documents Class. It obviously exists, the editor helps with the parameters etc, and the method is docummented:
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.word.documents.add.aspx
but the compiler still doesn't allow to use it ...
Any help will be appreciated,
thanks!
j.a.estevan
http://www.jaestevan.com
*This post is locked for comments
I have the same question (0)