WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Visio Automation Exception in GetStencilPaths()

 
   Home -> Office other -> TroubleShooting RSS
Next:  Background Printing  
Author Message
vicky

External


Since: Nov 25, 2008
Posts: 3



(Msg. 1) Posted: Tue Nov 25, 2008 4:12 am
Post subject: Visio Automation Exception in GetStencilPaths()
Archived from groups: microsoft>public>visio>troubleshoot (more info?)

Hi All!
I am developing a VC++ project for automating MS-Visio 2003, when i
am
trying to get stencil paths using function GetStencilPaths(), i have
following error:
COleException. SCODE: 800706ba.
I am working on Windows-XP (SP2), Visual Studio 6.0 and Visio-2003.
I am using following code to automate Visio:
//
***************************************************************************
***************************
CLSID
visio_clsid=
{ 0x00021a20, 0x0000, 0x0000, { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x46 } };
IUnknown *pUnk=
NULL;
IVApplication
app;
GetActiveObject(visio_clsid, NULL,
&pUnk);
IDispatch *pDisp =
NULL;
if ( pUnk !=
NULL )
pUnk->QueryInterface(IID_IDispatch, (LPVOID *)
&pDisp);
if ( pDisp ==
NULL )
{
if ( !app.CreateDispatch
(visio_clsid) )
{
return -2;
}
}

else
{
app.AttachDispatch
(pDisp);
}

app.SetVisible(TRUE); //Visio invoked and
visible.
CString strStencilPaths = app.GetStencilPaths(); //Problem occurrs
on
this line.
CString strXaStencilFolder = "c:\
\My_Stencil_Folder";
//Check if path is already
there,
if (strstr(strStencilPaths, strXaStencilFolder) ==
NULL)
{
strStencilPaths +=
";";
strStencilPaths +=
strXaStencilFolder;
app.SetStencilPaths
(strStencilPaths);
}

//
***************************************************************************
***************************
What causes this problem? Thanks in anticipation.
Regards,
Vicky
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> TroubleShooting All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support