문제

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