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#
  4. How to Open the Docx File in Silverlight

How to Open the Docx File in Silverlight

Scheduled Pinned Locked Moved C#
helpcomwindows-admintutorial
6 Posts 4 Posters 4 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.
  • H Offline
    H Offline
    Hrishikesh Shivacharan
    wrote on last edited by
    #1

    How to open the Docx file using 'microsoft.office.interop.word' this DLL. I Used Following code. Object SubTemplateFilePath = @"D:\TemplateMaster\Test1.docx"; Microsoft.Office.Interop.Word._Application oWord; Microsoft.Office.Interop.Word._Document oDoc; oDoc = oWord.Documents.Open(SubTemplateFilePath); When pointer go above statement then Silverlight application go endless loop. When Application put on local machine then application work very well but when application on IIS then get the error. I put all the setting in IIS. For Eg identity is localsystem but it is not working. Please help me.

    D B M 3 Replies Last reply
    0
    • H Hrishikesh Shivacharan

      How to open the Docx file using 'microsoft.office.interop.word' this DLL. I Used Following code. Object SubTemplateFilePath = @"D:\TemplateMaster\Test1.docx"; Microsoft.Office.Interop.Word._Application oWord; Microsoft.Office.Interop.Word._Document oDoc; oDoc = oWord.Documents.Open(SubTemplateFilePath); When pointer go above statement then Silverlight application go endless loop. When Application put on local machine then application work very well but when application on IIS then get the error. I put all the setting in IIS. For Eg identity is localsystem but it is not working. Please help me.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      So is this code running on the web server or is it part of a Silverlight app running on the client? Does the client have the same version of Word installed as the version you referenced when you built the code?

      A guide to posting questions on CodeProject

      Click this: Asking questions is a skill. Seriously, do it.
      Dave Kreskowiak

      1 Reply Last reply
      0
      • H Hrishikesh Shivacharan

        How to open the Docx file using 'microsoft.office.interop.word' this DLL. I Used Following code. Object SubTemplateFilePath = @"D:\TemplateMaster\Test1.docx"; Microsoft.Office.Interop.Word._Application oWord; Microsoft.Office.Interop.Word._Document oDoc; oDoc = oWord.Documents.Open(SubTemplateFilePath); When pointer go above statement then Silverlight application go endless loop. When Application put on local machine then application work very well but when application on IIS then get the error. I put all the setting in IIS. For Eg identity is localsystem but it is not working. Please help me.

        B Offline
        B Offline
        Brisingr Aerowing
        wrote on last edited by
        #3

        Instead of using the Office Interop libraries, you may want to take a look at DocX[^], which is a pure C# library for handling Microsoft Word files. I am not sure if it works in Silverlight (I can't find anything about that configuration), but if it does it might help you.

        What do you get when you cross a joke with a rhetorical question? The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism. Do questions with multiple question marks annoy you???

        1 Reply Last reply
        0
        • H Hrishikesh Shivacharan

          How to open the Docx file using 'microsoft.office.interop.word' this DLL. I Used Following code. Object SubTemplateFilePath = @"D:\TemplateMaster\Test1.docx"; Microsoft.Office.Interop.Word._Application oWord; Microsoft.Office.Interop.Word._Document oDoc; oDoc = oWord.Documents.Open(SubTemplateFilePath); When pointer go above statement then Silverlight application go endless loop. When Application put on local machine then application work very well but when application on IIS then get the error. I put all the setting in IIS. For Eg identity is localsystem but it is not working. Please help me.

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          The browser does not have access to your D: unless the app is installed as out of browser on your local system with elevated permissions. You need to download the docx and get the user to open the file, you cannot do it from the browser (Silverlight).

          Never underestimate the power of human stupidity RAH

          H 1 Reply Last reply
          0
          • M Mycroft Holmes

            The browser does not have access to your D: unless the app is installed as out of browser on your local system with elevated permissions. You need to download the docx and get the user to open the file, you cannot do it from the browser (Silverlight).

            Never underestimate the power of human stupidity RAH

            H Offline
            H Offline
            Hrishikesh Shivacharan
            wrote on last edited by
            #5

            I all ready installed on server but still I have problem.

            M 1 Reply Last reply
            0
            • H Hrishikesh Shivacharan

              I all ready installed on server but still I have problem.

              M Offline
              M Offline
              Mycroft Holmes
              wrote on last edited by
              #6

              Installed what on the server! I repeat, you need to download the DocX file as a binary (probably), get the user to save it on their local (D:) drive and then the user must open the file in word. Without elevated permissions Silverlight cannot access a local drive.

              Never underestimate the power of human stupidity RAH

              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