InvokeMember "InchesToPoints" doesn't work MS Word

D

Dmitry Nogin

Hi,

The following code works well for MS Excell but fails on MS Word...
Can you suggest anything? (.NET 2.0)

Type wordType = Type.GetTypeFromProgID("Word.Application");object
wordApplication = Activator.CreateInstance(wordType);

object margins = wordType.InvokeMember("InchesToPoints",
BindingFlags.InvokeMethod,

null, wordApplication, new object[] { (double)1 });
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top