how to create new ParagraphFormat object

M

mjlaali

I am developing a word automation application using MFC. I need to create a
new ParagraphFormat object and pass it to SetParagraphFormat method of a
Range object. The problem is that I don't know how to obtain an appropriate
IDispatch pointer and attach it to my newly created _ParagraphFormat object.
As a result the m_lpDispatch property of my object is NULL and when I pass it
to the method I will receive an exception with the code of 0x80070057 which
means the argument is invalid.
Is there anyone who could help me with this matter?
 

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