Cannot add more than 100 pictures to a Word Document via Automation RRS feed

  • Question

  • Hi,

    I am using Visual C++ to automate Word and try to add pictures to a Word document, via the following line:

    COLEInlineShape InlineShape = InlineShapes.AddPicture(strPicFileName, COleVariant(0l), COleVariant(1l), VARIANT_OPTIONAL); 

    The first 100 calls are correct. But starting from the 101 picture file, the call is correct, but the returned value of InlineShape is invalid(InlineShape.m_lpDispatch == NULL). Why?


    Friday, October 12, 2018 10:29 AM

All replies

  • Hi chcw,

    Please check the answer in this post.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread.

    Monday, October 15, 2018 6:11 AM