質問

I have reached this final step, where i need to invoke the "PasteAndFormat" method on the objContentLateBinded that I have correctly created, but now I need to pass the "WdRecoveryType.wdFormatOriginalFormatting" value as a parameter. WdRecoveryType is part of the late binded assembly "Microsoft.Office.Interop.Word", so how can use it in my code in place of -parameters-?

here is the row in question:

objContentLateBinded.GetType().InvokeMember("PasteAndFormat", BindingFlags.InvokeMethod, null, objContentLateBinded, -parameters-);
役に立ちましたか?

解決

After applying some reflection you can easily find that the value related to that parameter is 16. Just pass it as an integer, this will do the "magic".

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top