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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Visual C++ .net and Word 2003 automation

Visual C++ .net and Word 2003 automation

Scheduled Pinned Locked Moved C / C++ / MFC
c++csharptestingtoolsquestion
10 Posts 2 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
    tiziacaia
    wrote on last edited by
    #1

    I want write a doc file using Visual c++. I found a lot of microsoft examples but don't work. Somebody has a project that work that i can use als examples? Thanks a lot

    S 1 Reply Last reply
    0
    • T tiziacaia

      I want write a doc file using Visual c++. I found a lot of microsoft examples but don't work. Somebody has a project that work that i can use als examples? Thanks a lot

      S Offline
      S Offline
      Steve Thresher
      wrote on last edited by
      #2

      [Try this Microsoft article](http://Try this Microsoft article)[^] Systems AXIS Ltd - Software for Business ...

      T 1 Reply Last reply
      0
      • S Steve Thresher

        [Try this Microsoft article](http://Try this Microsoft article)[^] Systems AXIS Ltd - Software for Business ...

        T Offline
        T Offline
        tiziacaia
        wrote on last edited by
        #3

        Thaks a lot but there aren't examples for office 2003. My problem is that when i select the wrapped class, the file msword*.h and msword*.cpp aren't created but in the project i find only files for single classes that i selected (Capplication.h,CDocments.h,....) Understand you my problem? Thanks a lot and i hope you understand my english :~ :-O

        S 1 Reply Last reply
        0
        • T tiziacaia

          Thaks a lot but there aren't examples for office 2003. My problem is that when i select the wrapped class, the file msword*.h and msword*.cpp aren't created but in the project i find only files for single classes that i selected (Capplication.h,CDocments.h,....) Understand you my problem? Thanks a lot and i hope you understand my english :~ :-O

          S Offline
          S Offline
          Steve Thresher
          wrote on last edited by
          #4

          Can you give me more details on what you are attempting to do? Are you trying to use a framework such as MFC or just plain Win32 API? Are you trying to use the #import statement? Systems AXIS Ltd - Software for Business ...

          T 1 Reply Last reply
          0
          • S Steve Thresher

            Can you give me more details on what you are attempting to do? Are you trying to use a framework such as MFC or just plain Win32 API? Are you trying to use the #import statement? Systems AXIS Ltd - Software for Business ...

            T Offline
            T Offline
            tiziacaia
            wrote on last edited by
            #5

            I'm using MFC, and i tryed to use the #import but don't work. I thing the biggest problem is my office version that is 2003. When i add the wrapped class (type library), there isn't file like msword*.h in my project but only a lot of new class for word (for example CApplication.h, CDocuments.h, CDocument0.h,......). Undestand you my problem? thanks

            S 1 Reply Last reply
            0
            • T tiziacaia

              I'm using MFC, and i tryed to use the #import but don't work. I thing the biggest problem is my office version that is 2003. When i add the wrapped class (type library), there isn't file like msword*.h in my project but only a lot of new class for word (for example CApplication.h, CDocuments.h, CDocument0.h,......). Undestand you my problem? thanks

              S Offline
              S Offline
              Steve Thresher
              wrote on last edited by
              #6

              The article I suggested to you contains sample code to be used with visual studio 6 and I'm assuming you have VS.NET 2002 or 2003. You can still use the sample code with just some minor modifications. To start with the 'Add Class' wizard generates a header file for each class rather than one file for the whole type library. This means you need to add an include statement for each class you use. Next the class names have changed. What was _Application in Word2000 is now CApplication in Word2003 likewise _Documents has changed to CDocuments and _Document has changed to CDocument0. If you look at the header file names the class wizard adds to your project you can work it out. Finally the function names have changed. For instance GetActiveDocument() has changed to get_ActiveDocument() and SetVisible() has changed to put_Visible(). In general the functions are now called get_'property name' to retrieve the value of a property or put_'property name' to set the value of a property. If you would like a very basic VS.NET 2003 MFC dialog project that generates a word document I would be happy to send one to you. Systems AXIS Ltd - Software for Business ...

              T 2 Replies Last reply
              0
              • S Steve Thresher

                The article I suggested to you contains sample code to be used with visual studio 6 and I'm assuming you have VS.NET 2002 or 2003. You can still use the sample code with just some minor modifications. To start with the 'Add Class' wizard generates a header file for each class rather than one file for the whole type library. This means you need to add an include statement for each class you use. Next the class names have changed. What was _Application in Word2000 is now CApplication in Word2003 likewise _Documents has changed to CDocuments and _Document has changed to CDocument0. If you look at the header file names the class wizard adds to your project you can work it out. Finally the function names have changed. For instance GetActiveDocument() has changed to get_ActiveDocument() and SetVisible() has changed to put_Visible(). In general the functions are now called get_'property name' to retrieve the value of a property or put_'property name' to set the value of a property. If you would like a very basic VS.NET 2003 MFC dialog project that generates a word document I would be happy to send one to you. Systems AXIS Ltd - Software for Business ...

                T Offline
                T Offline
                tiziacaia
                wrote on last edited by
                #7

                hallo! very very thanks for your answer! i don't have now a lot of time but tomorrow i try! if you can send me your project files it's for me very good!! (my email address is tiziacaia@hotmail.com) thank a lot another time!

                1 Reply Last reply
                0
                • S Steve Thresher

                  The article I suggested to you contains sample code to be used with visual studio 6 and I'm assuming you have VS.NET 2002 or 2003. You can still use the sample code with just some minor modifications. To start with the 'Add Class' wizard generates a header file for each class rather than one file for the whole type library. This means you need to add an include statement for each class you use. Next the class names have changed. What was _Application in Word2000 is now CApplication in Word2003 likewise _Documents has changed to CDocuments and _Document has changed to CDocument0. If you look at the header file names the class wizard adds to your project you can work it out. Finally the function names have changed. For instance GetActiveDocument() has changed to get_ActiveDocument() and SetVisible() has changed to put_Visible(). In general the functions are now called get_'property name' to retrieve the value of a property or put_'property name' to set the value of a property. If you would like a very basic VS.NET 2003 MFC dialog project that generates a word document I would be happy to send one to you. Systems AXIS Ltd - Software for Business ...

                  T Offline
                  T Offline
                  tiziacaia
                  wrote on last edited by
                  #8

                  I thanks a lot for your answer! I make what do you say and now i haven't error when i build my project but when the document is opening i get an error but the message don't help me to understand this error. If you can send me your project i'm very happy! thanks a lot another time and i'm sorry for my english! bye

                  S 1 Reply Last reply
                  0
                  • T tiziacaia

                    I thanks a lot for your answer! I make what do you say and now i haven't error when i build my project but when the document is opening i get an error but the message don't help me to understand this error. If you can send me your project i'm very happy! thanks a lot another time and i'm sorry for my english! bye

                    S Offline
                    S Offline
                    Steve Thresher
                    wrote on last edited by
                    #9

                    I sent you the project a couple of days ago to the address you specified. Let me know if you need it sent to a different address. Alternatively if you have a small test project you would like me look at you can mail it to (steve . thresher @ ukonline . co . uk) remove the brakets and blanks. Systems AXIS Ltd - Software for Business ...

                    T 1 Reply Last reply
                    0
                    • S Steve Thresher

                      I sent you the project a couple of days ago to the address you specified. Let me know if you need it sent to a different address. Alternatively if you have a small test project you would like me look at you can mail it to (steve . thresher @ ukonline . co . uk) remove the brakets and blanks. Systems AXIS Ltd - Software for Business ...

                      T Offline
                      T Offline
                      tiziacaia
                      wrote on last edited by
                      #10

                      i see now your mail for example project but there isn't atachment! if you can try to resend me i thanks you a lot.

                      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