S
Scott McPhillips [MVP]
I am developing a Word COM Addin with C++ & ATL. From what I can tell
from the (barely relevant) VBA documentation the call below can return
three types of results: integer, enum or VT_DISPATCH to a Style object.
CComPtr <Paragraph> spParagraph;
CComVariant vtParaStyle = VT_EMPTY;
hr = spParagraphs->Item(para, &spParagraph);
ATLASSERT(SUCCEEDED(hr);
hr = spParagraph->get_Style(&vtParaStyle); // problem here
No matter how I initialize the vtParaStyle the returned type is always
VT_DISPATCH. Is there a way to get the other possible return types? I
need the enum form.
from the (barely relevant) VBA documentation the call below can return
three types of results: integer, enum or VT_DISPATCH to a Style object.
CComPtr <Paragraph> spParagraph;
CComVariant vtParaStyle = VT_EMPTY;
hr = spParagraphs->Item(para, &spParagraph);
ATLASSERT(SUCCEEDED(hr);
hr = spParagraph->get_Style(&vtParaStyle); // problem here
No matter how I initialize the vtParaStyle the returned type is always
VT_DISPATCH. Is there a way to get the other possible return types? I
need the enum form.