Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Adding a COM reference in vc++ .net

Adding a COM reference in vc++ .net

Scheduled Pinned Locked Moved C / C++ / MFC
csharpc++comhelpquestion
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tmoney101
    wrote on last edited by
    #1

    Hey, I just found this article http://www.codeproject.com/csharp/automate\_word.asp Its a great article and I follwed it and succesfully built my program in visual c# .net. But now I would like to build the same program in visual c++.net, however I get stuck on the first step, adding the microsoft word COM object. I have tried every way to get the reference window open but cant do it. Am i doing something wrong? Cheers.

    J P 2 Replies Last reply
    0
    • T tmoney101

      Hey, I just found this article http://www.codeproject.com/csharp/automate\_word.asp Its a great article and I follwed it and succesfully built my program in visual c# .net. But now I would like to build the same program in visual c++.net, however I get stuck on the first step, adding the microsoft word COM object. I have tried every way to get the reference window open but cant do it. Am i doing something wrong? Cheers.

      J Offline
      J Offline
      jk chan
      wrote on last edited by
      #2

      If you want to insert word activex in to a dialog right click on the dialog and select insert Activex control . Or u can try by using the CLSID of the com object . Both will work. regards krishnan

      If u can Dream... U can do it

      1 Reply Last reply
      0
      • T tmoney101

        Hey, I just found this article http://www.codeproject.com/csharp/automate\_word.asp Its a great article and I follwed it and succesfully built my program in visual c# .net. But now I would like to build the same program in visual c++.net, however I get stuck on the first step, adding the microsoft word COM object. I have tried every way to get the reference window open but cant do it. Am i doing something wrong? Cheers.

        P Offline
        P Offline
        prasad_som
        wrote on last edited by
        #3

        What problem you are facing ? If you are using CLR, then it is same way, as added in C# application. In case of MFC, you cannot add MS Word COM object, you can import its type library in you application and use it. This may give you some idea.

        Prasad Notifier using ATL

        T 1 Reply Last reply
        0
        • P prasad_som

          What problem you are facing ? If you are using CLR, then it is same way, as added in C# application. In case of MFC, you cannot add MS Word COM object, you can import its type library in you application and use it. This may give you some idea.

          Prasad Notifier using ATL

          T Offline
          T Offline
          tmoney101
          wrote on last edited by
          #4

          Ok, yes I am using mfc. Can you recommend any good articles on importing its type library in the application? Once i import it, can i then code pretty much the same as as explained in the tutorial i followed in my original post? ie. will i be able to use myWordDoc.SaveAs" for example? Or will it be completely different because im not using the com object? Thanks very much for you help.

          P 1 Reply Last reply
          0
          • T tmoney101

            Ok, yes I am using mfc. Can you recommend any good articles on importing its type library in the application? Once i import it, can i then code pretty much the same as as explained in the tutorial i followed in my original post? ie. will i be able to use myWordDoc.SaveAs" for example? Or will it be completely different because im not using the com object? Thanks very much for you help.

            P Offline
            P Offline
            prasad_som
            wrote on last edited by
            #5

            tmoney101 wrote:

            Can you recommend any good articles on importing its type library in the application?

            I've not read article , you mentioned. But you can see this article and ofcourse this article. It shows how it can be used

            Prasad Notifier using ATL

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups