Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Location
    UAE
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to: Open MS Word Application in vb.net?

    Hi all,

    I want to know the code of how to open an application from a button in a vb.net forum. The user can treat this application as if he open MS office word..
    I reached this code but it doesn`t work:

    Dim wa As New Microsoft.Office.Interop.Word.Application
    Dim wd As New Microsoft.Office.Interop.Word.Document
    wd = wa.document.open("C:\DocumentandSettings\User\Desktop\W.doc")

    Thank you ..

  • #2
    New to the CF scene
    Join Date
    Mar 2009
    Location
    UAE
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Sorry,

    I`ve noticed that I have the code:

    This is the code try it:

    Dim oWord
    Dim odoc
    oWord = CreateObject("Word.Application")
    oWord.Visible = True
    odoc = oWord.Documents.Add

    It should work..thx for you all..


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •