Using Word in VB 6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • arunbalait
    New Member
    • Feb 2007
    • 164

    Using Word in VB 6.0

    Hi..

    I used web browser control or Ole control to open word dicuments. But whenever I opening the document I coulnd not save the document from VB itself.

    I want to save the opened document.. The word document should be opened within VB and have to save the document without any dialog boxes. So that user cannot able to know where the file was saved..

    Give me spme ideas..


    Thank u
  • janugandhi
    New Member
    • Feb 2007
    • 1

    #2
    hello dear friend
    i m new to VB. can u help me in VB??

    Comment

    • arunbalait
      New Member
      • Feb 2007
      • 164

      #3
      Ya friend..

      Tell us your doubts, will answer you up to our knowledge......

      Comment

      • arunbalait
        New Member
        • Feb 2007
        • 164

        #4
        When I closes the opened document a msg box appears asking to save, rather than that I want to create a button or any to save the opened file...

        Give me some ideas..

        Thank you

        Comment

        • Mahesh83
          New Member
          • Feb 2007
          • 25

          #5
          HI

          It will help you
          Code:
          Dim oWord As Microsoft.Office.Interop.Word.Application
          Dim oDoc As Microsoft.Office.Interop.Word.Document
          oWord = CreateObject("Word.Application")
          oWord.Visible = False
          oDoc = oWord.Documents.Add
          
          'your content'
          
          oDoc.SaveAs(Application.StartupPath & "Test.doc")
          oWord.Quit()

          Mahesh

          Comment

          • arunbalait
            New Member
            • Feb 2007
            • 164

            #6
            Ya thanx

            I shall check it out...

            But I think this code opens ms word separately instead opening within VB window.

            Comment

            • hariharanmca
              Top Contributor
              • Dec 2006
              • 1977

              #7
              Originally posted by arunbalait
              Ya thanx

              I shall check it out...

              But I think this code opens ms word separately instead opening within VB window.

              so that you can use MS word OCX control in components

              Comment

              Working...