473,487 Members | 2,483 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Office Add-In, getting reference to OLEObject

Hi,

I'm writing an PowerPoint Add-In using C# which adds a toolbar and a button.
When the user clicks the button, an activex control is inserted into the
presentation. Is it possible to somehow type cast the
Microsoft.Office.Interop.PowerPoint.Shape or the shape.OLEFormat.Object to an
instance of the interop-class created for my activex control by visual
studio? I need to do this in order to transfer the state of another activex
control to the control inserted in PowerPoint.

Thank you.
Nov 14 '06 #1
2 2356
Can you add Shape.OLEfornat as a reference to C#? If can then try to cast
it. If there is no error when build then there you go. If you cannot even
add Shape.OLEfornat as a reference to C# then you know I know.

chanmm

"Johan" <Jo***@discussions.microsoft.comwrote in message
news:8E**********************************@microsof t.com...
Hi,

I'm writing an PowerPoint Add-In using C# which adds a toolbar and a
button.
When the user clicks the button, an activex control is inserted into the
presentation. Is it possible to somehow type cast the
Microsoft.Office.Interop.PowerPoint.Shape or the shape.OLEFormat.Object to
an
instance of the interop-class created for my activex control by visual
studio? I need to do this in order to transfer the state of another
activex
control to the control inserted in PowerPoint.

Thank you.

Nov 15 '06 #2
Well, after a lot of trial and error, I could cast it to its interface, but
not the generated class. But what I really would like is to insert an
instance of the class into powerpoint, but I guess I'm stuck with
addOLEObject which creates an instance.

Thanks anyway.

"chanmm" wrote:
Can you add Shape.OLEfornat as a reference to C#? If can then try to cast
it. If there is no error when build then there you go. If you cannot even
add Shape.OLEfornat as a reference to C# then you know I know.

chanmm

"Johan" <Jo***@discussions.microsoft.comwrote in message
news:8E**********************************@microsof t.com...
Hi,

I'm writing an PowerPoint Add-In using C# which adds a toolbar and a
button.
When the user clicks the button, an activex control is inserted into the
presentation. Is it possible to somehow type cast the
Microsoft.Office.Interop.PowerPoint.Shape or the shape.OLEFormat.Object to
an
instance of the interop-class created for my activex control by visual
studio? I need to do this in order to transfer the state of another
activex
control to the control inserted in PowerPoint.

Thank you.


Nov 15 '06 #3

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

Similar topics

0
2253
by: tel4 | last post by:
Microsoft Visual Studio Tools for the Microsoft Office System 2003 Microsoft Corp. DATE......: 03-10-2003 TYPE......: Application OS........: WinALL DiSKS.....: xx/02 PROTECTiON : NONE/RETAiL...
1
2797
by: cybertof | last post by:
Hello, Could you please tell me what's wrong with this code (c# office code behind) : protected void ThisWorkbook_Open() { try {
0
1464
by: Howard Kaikow | last post by:
I have a multiboot system. On one of the systems, I have Office 2002, VS .NET Pro 2002 and the Office 2002 PIA with .NET Framework 1.0. On another system, I have Office 2003, VS .NET Pro 2003...
0
1069
by: Tom Rahav | last post by:
Dear All! I use Visual Basic .NET 2003 and want to produce graphs by using Office Chart 11.0. I would like to provide this chart with data from an Office Spreadsheet 11.0 and I use the...
2
2777
by: timtai | last post by:
I am trying to create an excel report from my aspx.vb code. I got the following error trying to add a workbook: Dim xApp As New Microsoft.Office.Interop.Excel.Application Dim xWB As...
1
1703
by: Steve Murphy | last post by:
I have an existing project that will require some MS Office integration. Can I add that to a the existing project, or do I need to add a new MS Office project? Also, is just Word and Excel...
2
10692
by: RodneyAnonymous | last post by:
I've got some code for composing an e-mail from the contents of an RTF box. The first time I execute it, everything works fine. If I close my app and then re-run it, however, I always receive the...
1
14018
by: romcab | last post by:
Hi guys, I'm trying to manipulate excel using a C#.net and my problem is that I cannot add the namespace Microsoft.Office.Interop.Excel. Does anyone know why? Do I need to download it...
4
3588
by: Juhein½juhein | last post by:
Hello. If someone could lighten me up on this problem I would be very crateful. So I´m trying to deploy office 2003 with SP3 update and with MUI pack for finnish spell check. There is no...
9
1144
by: John | last post by:
Hi Is vs 2008 pro sufficient to write office add-Ins or do I need vsto 2005 SE as well to write office add-Ins? Thanks Regards
0
7108
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,...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7352
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5445
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,...
1
4875
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3078
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...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
272
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...

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.