using Microsoft.Office.Interop.Word.dll from MFC application in cpp

Elinor Ginzburg 106 Reputation points
2021-08-31T11:47:39.423+00:00

Hello,

I'm using Windows 10, Visual Studio 2019 community, and I'm writing a dialog-based MFC application in c++.

I want to use Microsoft.Office.Interop.Word.dll in order to save all specified parameters by the user into a pdf file, but I'm having trouble understanding how to used this dll from c++ code, since most of the guides are C# oriented.

perhaps someone has an advice for me? where can I read more about it? how can I use this dll in c++ code to create the desired pdf?

I've been battling with this for a while, any help will be appreciated.

Thank you!

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,480 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 82,491 Reputation points
    2021-08-31T12:42:54.697+00:00

    See MS samples for Office Interop with MFC, like How to automate Microsoft Word to perform a mail merge using Visual C++ and MFC
    or in C++/Win32 I use #import to generate interfaces (with MSO.DLL, MSWORD.OLB)

    1 person found this answer helpful.
    0 comments No comments