Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Word.application silent exception

$
0
0

Hello.

I am using word.application in AX, and every time I check a bookmark, there is an error message occured (at infolog) even I do nothing.

Here is My code:

COM wordApp;
COM wordDocuments;
COM wordDocument;
COM wordBookmarks;
COM wordBookmark;

wordApp = new COM("Word.Application");
wordDocuments = _wordApp.Documents();
wordDocument = _wordDocuments.add("myfilename.docx");
wordBookmarks = _wordDocument.Bookmarks();

try {
_wordBookmark = _wordBookmarks.Item("IsABCD");
} catch {

// before that line I get a message :

//  Method 'Item' in COM object of class 'Bookmarks' returned error code 0x800A1735 (<unknown>) which means: The requested member of the collection does not exist.

  exceptionTextFallThrough();
}

Why is the message as above, and how can I ignore that?

Thanks :)


Viewing all articles
Browse latest Browse all 72043

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>