Article ID: 198422
Article Last Modified on 5/12/2003
Option Explicit
Private Sub Command1_Click()
Dim obj As ACDual.Document
Dim strtext
Set obj = CreateObject("ACDual.Document")
obj.ShowWindow
strtext = obj.Text
End Sub
DECLARE_OLETYPELIB(CAutoClickDoc)
Add the following line after the "DECLARE_INTERFACE_MAP()" statement in
the class CAutoClickDoc definition:
virtual BOOL GetDispatchIID(IID* pIID);
//Replace the following with the GUID for your own typelib.
const GUID CDECL BASED_CODE _tlid =
{ 0x4B115284, 0x32F0, 0x11cf, { 0xAC, 0x85, 0x44, 0x45,
0x53, 0x54, 0x0, 0x0} };
const WORD _wVerMajor = 1;
const WORD _wVerMinor = 0;
IMPLEMENT_OLETYPELIB(CAutoClickDoc, _tlid, _wVerMajor, _wVerMinor)
Add the following line after the "//{{AFX_DISPATCH_MAP(CAutoClickDoc)"
statement:
DISP_PROPERTY(CAutoClickDoc, "text", m_str, VT_BSTR)
Add the following line after the "EnableAutomation();" statement in
CAutoClickDoc::CAutoClickDoc():
EnableTypeLib();
Near the end of the file, add the following code before the
"IMPLEMENT_DUAL_ERRORINFO(CAutoClickDoc, IID_IDualAClick)" statement:
BOOL CAutoClickDoc::GetDispatchIID(IID* pIID)
{
*pIID = IID_IDualAClick;
return TRUE;
}
Additional query words: kbDSupport
Keywords: kbautomation kbprb kbcode KB198422