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#
  4. Open word document

Open word document

Scheduled Pinned Locked Moved C#
tutorialcsharp
3 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.
  • E Offline
    E Offline
    eyalso
    wrote on last edited by
    #1

    hi i need an example how to open word document from C# thanks Eyal eyalso eyalso

    G R 2 Replies Last reply
    0
    • E eyalso

      hi i need an example how to open word document from C# thanks Eyal eyalso eyalso

      G Offline
      G Offline
      Green Fuze
      wrote on last edited by
      #2

      the EASIEST way to do so is simply running word. System.Diagnostics.Process.Start("winword", "\""+filename+"\""); winword runs word, while the filename in " is an argument with the filename you want to load. the other way is to create a word object, for that you will need to add to reference a COM (to the toolbox) called "Microsoft Word Object Library" (something like that). there you will have an object that will allow to automate word (if that is what you want to do). you can also download ms word tools for VS from microsoft's site.

      1 Reply Last reply
      0
      • E eyalso

        hi i need an example how to open word document from C# thanks Eyal eyalso eyalso

        R Offline
        R Offline
        rlejason
        wrote on last edited by
        #3

        You can use the following code ,if you use the Spire.Doc. Document document = new Document(); document.LoadFromFile(@"\YourFile.doc"); It is a c# word automation component ,that supports read and write doc, docx, html, image etc. embed image still support,may help to you.

        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