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 that the argument is invalid.
Is there anyone who could help me with this matter?
 
D

Doug Robbins - Word MVP

Googling for MFC leads me to believe that it may mean Microsoft Foundation
Class and I believe that it is something to do with C++, which is not the
purpose of this newsgroup which is for the use of VBA.

If that is the case, I would suggest that you look at:

msdn.microsoft.com/en-us/library/d06h2x6e(VS.71).aspx

or

devcentral.iftech.com/articles/MFC/default.php



--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 

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