i try to save a word document as html format. But how can i create a instance of "Microsoft.Officce.Interop.Word.WdSaveFormat"? I need this enum for the function:
Create a DotNet instance of that type and pass it to SaveAs2.
Paste the following snip into a text file and import as a codeunit, you can the copy the variable decl to your own object. The WdSaveFormat type is a simple enum tha tcan be handled with the normal DotNet support in AL. If you have top use more than a few office interop functions, I will strongly recommend to add a C# wrapper assembly that encapsulates the requried fucntions in an API that can be used in AL without adding the full parameter list.
_________________
Niels-Henrik Sejthen
Senior Software Developer
Microsoft Dynamics NAV
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.
Answers
Paste the following snip into a text file and import as a codeunit, you can the copy the variable decl to your own object. The WdSaveFormat type is a simple enum tha tcan be handled with the normal DotNet support in AL. If you have top use more than a few office interop functions, I will strongly recommend to add a C# wrapper assembly that encapsulates the requried fucntions in an API that can be used in AL without adding the full parameter list.
Niels-Henrik Sejthen
Senior Software Developer
Microsoft Dynamics NAV
The information in this post is provided "AS IS" with no warranties, and confers no rights. This post does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion.