473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

C# for embeddable (OLE) object in MS Office etc.


Office Addins are easy in .NET. Try this from Visual
Studio's main menu:

File
New Project
"Other Projects"
Extensibility Projects
Shared Addin

Run the wizard and you're off...

--Richard

-----Original Message-----
I want to make an embeddable object for Word etc. (say
Word 97 and later), a traditional OLE object as per
Insert/Object.

Previously, I've done this using MFC/C++. I'd now like to
take a shot at using C# instead.

So. Does anyone know of a working sample of how to do thiscorrectly. A quick search through MSDN etc. drew a blank,
although perhaps I missed something dressed in sheeps
clothing...

Thanks
Bob
.

Nov 15 '05 #1
4 6224
Thanks Richard,

Yes, Extensibility interface is a start. However this is
an area where we are not overwhelmed by samples and
documentation. Do you know of any?

Also, Ideally I'd like to go back to Word 97 if possible
so and looking at conformance with that clients OLE2
embedding and linking specifications. I'm guessing the
office add-ons have a whole bunch of version issues if not
just focussed on Office XP.

Also, I'm interested in being useable from applications
other than office.

Any sources of help on this subject?

Bob
-----Original Message-----

Office Addins are easy in .NET. Try this from Visual
Studio's main menu:

File
New Project
"Other Projects"
Extensibility Projects
Shared Addin

Run the wizard and you're off...

--Richard

-----Original Message-----
I want to make an embeddable object for Word etc. (say
Word 97 and later), a traditional OLE object as per
Insert/Object.

Previously, I've done this using MFC/C++. I'd now like totake a shot at using C# instead.

So. Does anyone know of a working sample of how to do

this
correctly. A quick search through MSDN etc. drew a blank,although perhaps I missed something dressed in sheeps
clothing...

Thanks
Bob
.

.

Nov 15 '05 #2

Hi Bob,

Yes, there are few resource related to create office add-in with .Net, but
there are some create with VBA, I think you can refer to these articles and
transplant them into .Net application.

You can refer to the related office component and use com interop to work
with it.

For how to use .Net to create office addin in VS.net please refer to "HOW
TO: Create and Load Add-ins in the Visual Studio .NET IDE by Using Visual
Basic .NET":
http://support.microsoft.com/default...b;en-us;317345

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Bob Richmond" <sa*****@csi.com>
| Sender: "Bob Richmond" <sa*****@csi.com>
| References: <09****************************@phx.gbl>
<1f****************************@phx.gbl>
| Subject: C# for embeddable (OLE) object in MS Office etc.
| Date: Fri, 3 Oct 2003 08:47:29 -0700
| Lines: 57
| Message-ID: <00****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcOJxabycsASjKDbS3S98fdfRl3YPQ==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:188785
| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Thanks Richard,
|
| Yes, Extensibility interface is a start. However this is
| an area where we are not overwhelmed by samples and
| documentation. Do you know of any?
|
| Also, Ideally I'd like to go back to Word 97 if possible
| so and looking at conformance with that clients OLE2
| embedding and linking specifications. I'm guessing the
| office add-ons have a whole bunch of version issues if not
| just focussed on Office XP.
|
| Also, I'm interested in being useable from applications
| other than office.
|
| Any sources of help on this subject?
|
| Bob
|
| >-----Original Message-----
| >
| >Office Addins are easy in .NET. Try this from Visual
| >Studio's main menu:
| >
| >File
| > New Project
| > "Other Projects"
| > Extensibility Projects
| > Shared Addin
| >
| >Run the wizard and you're off...
| >
| >--Richard
| >
| >
| >>-----Original Message-----
| >>I want to make an embeddable object for Word etc. (say
| >>Word 97 and later), a traditional OLE object as per
| >>Insert/Object.
| >>
| >>Previously, I've done this using MFC/C++. I'd now like
| to
| >>take a shot at using C# instead.
| >>
| >>So. Does anyone know of a working sample of how to do
| >this
| >>correctly. A quick search through MSDN etc. drew a
| blank,
| >>although perhaps I missed something dressed in sheeps
| >>clothing...
| >>
| >>Thanks
| >>Bob
| >>.
| >>
| >.
| >
|

Nov 15 '05 #3
Thanks Jeffrey

Will see what can find and do. Still unsure about office
version interoperability of add-ins. Have you any idea? Is
there a clear statement anywhere on this?

Have to say in in some ways it seems easier to stick with
C++/MFC where documentation is less elusive and products
certainly work.

Do you know if anywhere there is a C# (or even VBA or
whatever) sample of an not totally trivial add-in. Like
the old OLE2 scribble sample.

Bob
-----Original Message-----

Hi Bob,

Yes, there are few resource related to create office add- in with .Net, butthere are some create with VBA, I think you can refer to these articles andtransplant them into .Net application.

You can refer to the related office component and use com interop to workwith it.

For how to use .Net to create office addin in VS.net please refer to "HOWTO: Create and Load Add-ins in the Visual Studio .NET IDE by Using VisualBasic .NET":
http://support.microsoft.com/default.aspx?scid=kb;en- us;317345
Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Bob Richmond" <sa*****@csi.com>
| Sender: "Bob Richmond" <sa*****@csi.com>
| References: <09****************************@phx.gbl>
<1f****************************@phx.gbl>
| Subject: C# for embeddable (OLE) object in MS Office etc.| Date: Fri, 3 Oct 2003 08:47:29 -0700
| Lines: 57
| Message-ID: <00****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcOJxabycsASjKDbS3S98fdfRl3YPQ==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:188785| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Thanks Richard,
|
| Yes, Extensibility interface is a start. However this is| an area where we are not overwhelmed by samples and
| documentation. Do you know of any?
|
| Also, Ideally I'd like to go back to Word 97 if possible| so and looking at conformance with that clients OLE2
| embedding and linking specifications. I'm guessing the
| office add-ons have a whole bunch of version issues if not| just focussed on Office XP.
|
| Also, I'm interested in being useable from applications
| other than office.
|
| Any sources of help on this subject?
|
| Bob
|
| >-----Original Message-----
| >
| >Office Addins are easy in .NET. Try this from Visual
| >Studio's main menu:
| >
| >File
| > New Project
| > "Other Projects"
| > Extensibility Projects
| > Shared Addin
| >
| >Run the wizard and you're off...
| >
| >--Richard
| >
| >
| >>-----Original Message-----
| >>I want to make an embeddable object for Word etc. (say| >>Word 97 and later), a traditional OLE object as per
| >>Insert/Object.
| >>
| >>Previously, I've done this using MFC/C++. I'd now like| to
| >>take a shot at using C# instead.
| >>
| >>So. Does anyone know of a working sample of how to do
| >this
| >>correctly. A quick search through MSDN etc. drew a
| blank,
| >>although perhaps I missed something dressed in sheeps
| >>clothing...
| >>
| >>Thanks
| >>Bob
| >>.
| >>
| >.
| >
|

.

Nov 15 '05 #4

Hi Bob,

I think the COM Add-ins is a good and strong feature introduced by
Microsoft, it is convinient to use it work with Office application.
You can create COM add-ins in any language that supports COM, such as VBA,
Visual Basic, and Microsoft Visual C++. Add-ins created with Office
Developer are packaged automatically as DLLs and registered for loading in
the host application. You also can create a single add-in that can work in
several applications.
For a Walkthrough to create COM add-in with VBA, please refer to :
http://msdn.microsoft.com/library/de...us/modcore/htm
l/dewlkwalkthroughcreatingcomadd-in.asp

I think you also can refer to the OLE Automation.
Automation (formerly OLE Automation) is a feature that programs use to
expose their objects to development tools, macro languages, and other
programs that support Automation.
For How to Use (OLE) Automation with Word, please refer to:
http://support.microsoft.com/default...b;en-us;184974

You can search "OLE Automation" in MSDN to find more information about it.

Hope this helps,
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| Content-Class: urn:content-classes:message
| From: "Bob Richmond" <sa*****@csi.com>
| Sender: "Bob Richmond" <sa*****@csi.com>
| References: <09****************************@phx.gbl>
<1f****************************@phx.gbl>
<00****************************@phx.gbl>
<pd**************@cpmsftngxa06.phx.gbl>
| Subject: RE: C# for embeddable (OLE) object in MS Office etc.
| Date: Thu, 9 Oct 2003 09:59:25 -0700
| Lines: 137
| Message-ID: <00****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOOhrGbMJS7bDHfT4Kff+9DTVLW9A==
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:190308
| NNTP-Posting-Host: TK2MSFTNGXA12 10.40.1.164
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Thanks Jeffrey
|
| Will see what can find and do. Still unsure about office
| version interoperability of add-ins. Have you any idea? Is
| there a clear statement anywhere on this?
|
| Have to say in in some ways it seems easier to stick with
| C++/MFC where documentation is less elusive and products
| certainly work.
|
| Do you know if anywhere there is a C# (or even VBA or
| whatever) sample of an not totally trivial add-in. Like
| the old OLE2 scribble sample.
|
| Bob
|
| >-----Original Message-----
| >
| >Hi Bob,
| >
| >Yes, there are few resource related to create office add-
| in with .Net, but
| >there are some create with VBA, I think you can refer to
| these articles and
| >transplant them into .Net application.
| >
| >You can refer to the related office component and use com
| interop to work
| >with it.
| >
| >For how to use .Net to create office addin in VS.net
| please refer to "HOW
| >TO: Create and Load Add-ins in the Visual Studio .NET IDE
| by Using Visual
| >Basic .NET":
| >http://support.microsoft.com/default.aspx?scid=kb;en-
| us;317345
| >
| >Hope this helps,
| >Best regards,
| >Jeffrey Tan
| >Microsoft Online Partner Support
| >Get Secure! - www.microsoft.com/security
| >This posting is provided "as is" with no warranties and
| confers no rights.
| >
| >--------------------
| >| Content-Class: urn:content-classes:message
| >| From: "Bob Richmond" <sa*****@csi.com>
| >| Sender: "Bob Richmond" <sa*****@csi.com>
| >| References: <09****************************@phx.gbl>
| ><1f****************************@phx.gbl>
| >| Subject: C# for embeddable (OLE) object in MS Office
| etc.
| >| Date: Fri, 3 Oct 2003 08:47:29 -0700
| >| Lines: 57
| >| Message-ID: <00****************************@phx.gbl>
| >| MIME-Version: 1.0
| >| Content-Type: text/plain;
| >| charset="iso-8859-1"
| >| Content-Transfer-Encoding: 7bit
| >| X-Newsreader: Microsoft CDO for Windows 2000
| >| Thread-Index: AcOJxabycsASjKDbS3S98fdfRl3YPQ==
| >| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| >| Newsgroups: microsoft.public.dotnet.languages.csharp
| >| Path: cpmsftngxa06.phx.gbl
| >| Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.languages.csharp:188785
| >| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| >| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
| >|
| >| Thanks Richard,
| >|
| >| Yes, Extensibility interface is a start. However this
| is
| >| an area where we are not overwhelmed by samples and
| >| documentation. Do you know of any?
| >|
| >| Also, Ideally I'd like to go back to Word 97 if
| possible
| >| so and looking at conformance with that clients OLE2
| >| embedding and linking specifications. I'm guessing the
| >| office add-ons have a whole bunch of version issues if
| not
| >| just focussed on Office XP.
| >|
| >| Also, I'm interested in being useable from applications
| >| other than office.
| >|
| >| Any sources of help on this subject?
| >|
| >| Bob
| >|
| >| >-----Original Message-----
| >| >
| >| >Office Addins are easy in .NET. Try this from Visual
| >| >Studio's main menu:
| >| >
| >| >File
| >| > New Project
| >| > "Other Projects"
| >| > Extensibility Projects
| >| > Shared Addin
| >| >
| >| >Run the wizard and you're off...
| >| >
| >| >--Richard
| >| >
| >| >
| >| >>-----Original Message-----
| >| >>I want to make an embeddable object for Word etc.
| (say
| >| >>Word 97 and later), a traditional OLE object as per
| >| >>Insert/Object.
| >| >>
| >| >>Previously, I've done this using MFC/C++. I'd now
| like
| >| to
| >| >>take a shot at using C# instead.
| >| >>
| >| >>So. Does anyone know of a working sample of how to do
| >| >this
| >| >>correctly. A quick search through MSDN etc. drew a
| >| blank,
| >| >>although perhaps I missed something dressed in sheeps
| >| >>clothing...
| >| >>
| >| >>Thanks
| >| >>Bob
| >| >>.
| >| >>
| >| >.
| >| >
| >|
| >
| >.
| >
|

Nov 15 '05 #5

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

Similar topics

1
by: James Hollyhomes | last post by:
I am using the DSO OLE Document Properties Reader 2.0 to update custom properties in office files. (i.e. a word document) After updating a couple of times, the word document becomes corrupted. ...
0
by: C Williams | last post by:
I have a question about something I looked into a little while ago, then abandoned, and now would like to come back to. I would like to create an object that can be embedded in Word, Excel...
1
by: Nothing | last post by:
I am trying to create an field on a form which is link to a table to store pictures. I have the field defined as follows: Name: Photofield1 Type: OLE Object I have created a form with this...
9
by: Avi Nahir | last post by:
Hi all, I'm developing a C# .Net Windows Forms application, and am trying to "host" mshtml. Observing ItWriting control (http://www.itwriting.com/htmleditor/index.php), I saw it implements...
6
by: david epsom dot com dot au | last post by:
When I open the table directly, I can see "MS PhotoEd.3" Sometimes when the field is selected, I see "Microsoft Photo Editor 3.0 Picture" Is there anyway I can use VBA to get this information? ...
3
by: Robin Tucker | last post by:
It seems that all of the interfaces, such as IDataObject etc. from basic OLE are no longer supported in .NET, although they are implemented (differently). I have an OLE object type and am having...
8
by: Jon Weston | last post by:
I'm setting up an Access2003 database with pictures. I put a bound ole picture ctrl on a form that's source is the table that contains the pictures and follow ALL the directions for embedding a...
1
by: Rico | last post by:
Hello, I have an ole object field (Access XP/2002) which I store images in. I have a couple of questions regarding this; is it possible to determine the image dimensions? Secondly, is there...
2
by: phill86 | last post by:
Hi, I am using office 2007 and I am trying to insert the Microsoft Office Outlook View control into a form in an access database and I am getting the following error message. The Operation on...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.