Newbie Develop Office App using .Net

Hi everybody,

I like to study on developing office applications like excel and word using C#, what do I need to install and study materials to study Can you provide me a list

I am using VS 2002 and Visual C# 2005 Express Edition. Thanks in advanced.

den2005



Answer this question

Newbie Develop Office App using .Net

  • NetPochi

    Hi Cindy,

    Thanks for your reply...Can you discuss in detail further how could develop office applications using .Net and what do I need to setup, configure and install I am using Windows 2000 Professional.

    Please clarify in detail what you meant by "For Office 2000 your only choice is to let Visual Studio generate a set of IAs when you create a reference to the COM library (tlb) for the application(s) you want to use in your solution. These should be distributed as part of your application." Can you provide codes, samples or documents how to do this

    About the VSTO, would it worked with Express Edition and Office 2000 Basically, I want to create and manipulate data stored say in Excel application, read, modify cells, delete data, and other things possible. How would start doing this What is InfoPath had to do with developing office application with .Net Any insight about this

    Thanks.

    Dennis


  • carlp22

    Thanks for the reply. Cindy..

    But when I browse over some of these office applications using .Net, I noticed it uses classes from Microsoft.Office namespace, which unfortunately is not available in .Net Framework versions I installed in my pc..So, I asked where could I get this dll Thanks again...

    Dennis


  • molemenacer

    Besides the Office applications, themselves, AND their PIAs, there's nothing you really need to install. The order of installation is important: be sure the .NET Framework is installed on the machine before installing Office 2003, then the PIAs will install automatically into the GAC.

    As a reference, I can recommend .NET Development for Office by Andrew Whitechapel, from Microsoft Press. Besides that, there's an entire section on Office development on the msdn website:

    http://msdn.microsoft.com/office/

    For assistance on dealing with individual Office automation interfaces, the best places to ask are the product-specific newsgroups, or possibly one of the Office.developer groups (see the list posted by Mike Hernandez at the top of this forum, in the "Read this first" posting).



  • stubs

    Hi Dennis

    Let's take this to the more appropriate group, then we can go into things in some detail :-) I won't feel I have to keep my answers short in order to not "clutter" this list. What's more, we may find there are a number of others interested in the same topic, here

    http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.office.developer.automation&lang=en&cr=US

    When you post, basically asking your last question, please include

    - Version of Visual Studio you have

    - Version of Office installed on the same machine



  • Johan_SQLDBA

    Thanks for having patience answering may "newbie" or "stupid" questions...So, based on the specs I have I cannot developed application in .Net to interact with office applications like Excel

    DennisSmile


  • Rtalan

    Hi Dennis

    Just to be sure I've undestood correctly: You want to AUTOMATE Office. (Or possibly create a COM Addin) At this point you're not concerned about creating an Office document containing managed code (vs. native VBA).

    If I've understood correctly, then you require:

    - Any version of the .NET Framework (at this point, 1.1 or 2.0 I'd think). It should be installed first, if you have a choice.

    - The Office application(s) you want to automate must be installed. If you install Office 2003 after the .NET Framework, then the PIAs (Primary Interop Assemblies) will be installed automatically. If the Framework is installed "on top" of Office, Setup will need to be run again in "Change" mode to install the PIAs

    If we're talking any earlier version of Office (2000 or 2002): You can download a set of PIAs for 2002 (XP) from microsoft.com; these can also be redistributed. For Office 2000 your only choice is to let Visual Studio generate a set of IAs when you create a reference to the COM library (tlb) for the application(s) you want to use in your solution. These should be distributed as part of your application.

    The rest of the things you list pertain ONLY if you're interested in creating a document-specific solution (VSTO = Visual Studio Tools for Office). There have been two versions of this, the first ran under 1.1, the current is designed for 2.0 (VS 2005). Both work only with Office 2003 and not all versions of Office on-sale contain the necessary support (stand-alone, Pro and Enterprise, if memory serves).

    Does this help sort things out a bit :-)



  • Jan Kučera

    There are no stupid questions :-)

    But you do need to read my responses to you more carefully. There is a single, separate paragraph in my last reply where I state you CAN automate Excel (or other Office apps) using Visual Studio Express.

    Automation means you control the application from outside the application (other means than VBA within the application).

    But you can't just sit down and do it "for fun". You do have to understand the basics of the processes involved:
    - the object model of the application you want to control (how do I make it do what I want it to do)

    - how to use the programming environment (learn how to work with VS Express to do basic things)

    - how to automate a COM application from within the .NET environment (it's sort of like communication between a Martian and a Venusian - they need an interpreter to find common ground)

    If you have no programming background whatsoever, then my advice would be to start by learning to manipulate Excel within its own VBA environment. This way, you'll learn its object model - how to control it.

    Next, a "step-by-step" course for VS Express, so that you understand the basics of using the .NET Framework.

    Then, you can start putting the two together. And I very highly recommend you get ".NET Development for Office" by Andrew Whitechapel, from MS Press so that you get a basic understanding of how to make COM and .NET co-exist peacefully :-)



  • Deac910

    Thanks for patience, Cindy... VBA is Visual Basic For Application. Right But this is version 6 and not .Net. Right

    How exactly to do "how to automate a COM application from within the .NET environment " I have read some info on Office Applications, it involves Microsoft.Office Class objects, which unfortunately Microsof.Office namespace dll is not available in my pc. Thanks for clearing some things.

    Dennis


  • Pat Pope

    Thanks..

    Dennis


  • XBTester

    Hi Cindy or anybody,

    So to be able to develop office application suing .Net I need the following:

    To run Visual Studio 2005 Tools for Office solutions, you must install the following software on the each user's computer:

    • The Microsoft .NET Framework version 2.0.
    • A version of Word 2003, Excel 2003, or Outlook 2003 that supports Visual Studio 2005 Tools for Office. (Installed )
    • Microsoft Office 2003 primary interop assemblies. (Installed )
    • Visual Studio 2005 Tools for Office Runtime
    • Microsoft Visual Studio 2005 Tools for the Microsoft Office System (VSTO2005) Language Package (optional)

    Which of this is the "Visual Studio 2005 Tools for Office Runtime"

    Update for Office 2003 (KB907417)

    Microsoft has released an update for Microsoft Office Excel 2003 and for Microsoft Office Word 2003. This update corrects a potential problem in which an add-in, a smart tag, or a smart document may not load if it uses the Microsoft .NET Framework 2.0.

    11/8/2005

    #151

    Visual Studio 2005 Tools for the Microsoft Office System (VSTO 2005) Redistributable Package (x86)

    VSTO 2005 is the technology that brings the power and productivity of Visual Studio .NET and the .NET Framework to business solutions built on Microsoft Word 2003, Microsoft Outlook 2003, Microsoft Excel 2003 or Microsoft InfoPath 2003.

    1/22/2006

    #507

    Deploying Visual Studio 2005 Tools for Office Solutions Using Windows Installer

    Learn how to deploy a Microsoft Visual Studio 2005 Tools for the Microsoft Office System solution using a Visual Studio 2005 Setup project to create a Windows Installer package.

    12/20/2005

    #2041

    Microsoft Visual Studio 2005 Tools for the Microsoft Office System (VSTO2005) Redistributable Package Beta 2 (x86)

    Can anybody guide exactly what is needed to be installed How about if I use only VS 2002, what do I need to install

    Thanks in advanced.

    Dennis


  • GreatDane

    Hi Dennis

    You're really getting well beyond the scope of this forum, now :-)

    Have you delved into the information on the MSDN Office Developer site For questions about Interop Assemblies, you may want to start here (and then buy the book from which it was excerpted)

    http://msdn.microsoft.com/library/default.asp url=/library/en-us/odc_of2003_bk/html/officeinteroperabilitych2_part1.asp

    VSTO is specific to Office 2003 (and later), it can't be used with other Office versions. Those versions lack the "hooks" built into Office 2003. As a matter of fact, not all the Office packages you can buy off the shelf have the necessary "hooks" for VSTO and the full XML capability of Office 2003, as these technologies are targeted mainly at large corporations. Also, VSTO is not built into Visual Studio, unless you have the full Team Suite. It's definitely not part of any Express product.

    You can still automate Office from an Express version, just not use VSTO.

    InfoPath provides an interface for data entry and viewing via XML. Currently, there is no direct relationship to Visual Studio or VSTO. There will be some integration in the next version, but that's still in a preview, not even beta stage. That will allow you to control/direct the work in InfoPath using managed code and Windows Forms interfaces.



  • Newbie Develop Office App using .Net