How to open MS Word Inside VB Application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vishwa Ram
    New Member
    • May 2007
    • 30

    How to open MS Word Inside VB Application

    Hi Friends,

    I am trying to open MS Word Inside VB Application with all controls. I can open only notepad. But Unable to open Word in side VB Form.

    If any one know please suggest me.

    Thanks
    vishwa Ram.
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Use "OLE" control on the form, or
    "Shell" the application

    Regards
    Veena

    Comment

    • vishwa Ram
      New Member
      • May 2007
      • 30

      #3
      Dear Veena,

      Thanks for your nice Idea,

      1. When I use Shell, Word opens as sepate window.
      2. When I use OLE, it is avail inside application. All word functions available.

      But I want all menu and Icon on the heading. How we can get these thing please suggest. also File Menu.

      Thanks,
      vishwa Ram.

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        Set OLE Control's MiscFlags property =2

        Want To take a look at this M$ Link

        REgards
        Veena

        Comment

        • vishwa Ram
          New Member
          • May 2007
          • 30

          #5
          Dear Veena,

          Thanks for your excellant help.

          I am following what you said. I want to open New/Existing/Save/SaveAs document from/to a particular location. Can't do these thing in this Embeded application in OLE. Please suggest how to do these things.

          Thanks
          vishwa Ram

          Comment

          • QVeen72
            Recognized Expert Top Contributor
            • Oct 2006
            • 1445

            #6
            Hi,

            You can use "OLE's :
            SaveToFile
            ReadFromFile

            or else use "Common Dialog Control" To Open/Save files.

            REgards
            Veena

            Comment

            • vishwa Ram
              New Member
              • May 2007
              • 30

              #7
              Dear Veena,

              when we use the below OLE method, we need to pass a integer argument. How to pass a argument, when i pass a integer, it throws an error.

              SaveToFile(File Num as Integer)
              ReadFromFile(Fi leNum as Integer)

              Regards,
              vishwa Ram.

              Comment

              • QVeen72
                Recognized Expert Top Contributor
                • Oct 2006
                • 1445

                #8
                Hi Vishwa,

                you can also save like this :

                [code=vb]

                OLE1.object.Sav eAs ("C:\MyNewFile. doc")

                [/code]

                Regards
                Veena

                Comment

                • vishwa Ram
                  New Member
                  • May 2007
                  • 30

                  #9
                  Dear Veena,

                  Thanks a lot for your helping.

                  Thanks,
                  vishwa Ram.

                  Comment

                  Working...