473,785 Members | 2,391 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using Microsoft.Offic e.Interop.Visio in C++/CLI

I'm writing a project that does Visio automation. I'm writing it in C+
+/CLI because it needs to reference a good amount of native C++ code.

One way to call the Visio API, of course, is to use the COM interface
provided in Visio SDK. However, a colleague of mine has been using
Microsoft.Offic e.Interop.Visio in his VB.NET project, which is far
more convenient than COM.

I thought I could do the same in C++/CLI, but it didn't work. Since,
the Microsoft.Offic e.Interop.Visio PIA resides in C:/WINDOWS/assembly
folder on my computer, I added that path in the "Resolve #using
References" property in VS2005. However, despite that, the compiler
still couldn't find the assembly
"Microsoft.Offi ce.Interop.Visi o.dll".

Then I tried the full path declaration: #using "C:/WINDOWS/
assemblyMicroso ft.Office.Inter op.Visio.dll". But compiler still
complained that it couldn't find the assembly. Next I tried adding the
reference of the PIA to the project, but the damn thing just won't
add!

I was expecting that since C++/CLI is just another .NET language like
VB.NET, the Interop should work there too, but it didn't. So what I
want to know is, is there something I'm doing wrong here? How can I
succeed in using the Visio Interop in my C++/CLI code, if it can be
done at all? Or, if it is not possible, then what would be an
alternative more convenient than the Visio COM Interface?

Sep 11 '07 #1
0 3607

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3403
by: Chris | last post by:
Hi, everything works apart from the last line :-(( rng.Value2.ToString() An exception is thrown : "Old format or invalid type library" It gets compiled though (so he recognizes the property 'Value2'). So I suppose I'm using a incompatible type lib. I'm using Excel 2002 : Excel 10.0 Object Library
5
25721
by: kewalmehra | last post by:
Hi All, I have a requirement of saving Excel files as HTML using C#. I have managed to write code for saving as HTLM file. however this seems to be not working in the once perticular case . For e.g I hav the following values are in column say A1 & A2.
3
2859
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and additionally pictures of the product are stored in an images subfolder and the database holds the file name of the relevant picture. The user can then click a button to display the picture in a pop-up window and also another button to email the potential...
5
3153
by: Mike in Santa Rosa | last post by:
I'm trying to get a simple c# app built that can launch/manipulate an excel workbook, sheet. I've chased down several examples and can't any of them to work. So I must be doing somethnig obviouslt wrong. Most examples to get things started include something: using Microsoft.Office.Interop.Excel; or using Excel; or using Excel = Microsoft.Office.Interop.Excel;
4
30148
by: B.N.Prabhu | last post by:
How to delete first row from an Excel Sheet using C#.Net. Please Help. Its very urgent.
0
3154
by: Dennis G | last post by:
Hi, When the asp.net page is loading, i want to open a visio file (2007), change the commandstring of a datarecordset in the visio file, export the visio file to an image file (.png) and show the image on my asp.net page. But a get an error: Retrieving the COM class factory for component with CLSID {00021A20-0000-0000-C000-000000000046} failed due to the following error: 80070003.
2
7305
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a "Array index out of bounds". Microsoft.Office.Interop.Outlook._Application olApp = new Microsoft.Office.Interop.Outlook.ApplicationClass(); Microsoft.Office.Interop.Outlook._NameSpace olNs = olApp.GetNamespace("MAPI");
0
2758
by: liam_jones | last post by:
I'm very new to Python, well IronPython to precise, and have been having problems when using Excel. The problem I'm having is the closing of my Excel object. I'm able to successfully quit the Excel Application that I create, but when I open a Workbook in the Application I can't successfully Quit Excel (by this I mean I can quit it, but the Excel process isn't getting killed and I have to manually go this through Task Manager). I've...
2
2534
by: harichinna | last post by:
Hi to all, My name is hari, iam trying to delete the column value of spread sheet using c sharp, iam trying to get the value and compare, when comparing it showing some errors, can any one help me, to slove this issue i pasted code below Microsoft.Office.Interop.Excel.Application ObjExcel = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel.Workbook ObjWorkBook=null; ...
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10325
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10091
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8972
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5381
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3646
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2879
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.