I have been able to create an instance of SharePoint.OpenDocuments.1 ActiveX Control like so:
CLSID clsid;
HRESULT hResult;
IDispatch *pWApp;
LPCOLESTR strPid = L"SharePoint.OpenDocuments.1";
CoInitialize(NULL);
hResult = CLSIDFromProgID(strPid, &clsid);
if(SUCCEEDED(hResult))
hResult = CoCreateInstance(clsid, NULL, CLSCTX_ALL , IID_IDispatch, (void **)&pWApp);
I have some trouble invoking the "EditDocument" method with a document name. I can't figure out how to invoke or use Variants.
Any code tips?