Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8532273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:40:42+00:00 2026-06-11T09:40:42+00:00

How can I save a document as .docx locally using the API? I got

  • 0

How can I save a document as .docx locally using the API?
I got the URL, and managed to do a workaround like this:

   Dim documentUri As Uri = New Uri(feed.Entries(0).Content.AbsoluteUri + "&exportFormat=docx&format=docx")
    Dim stream As Stream = service.Query(documentUri)
    Dim streamReader As StreamReader = New StreamReader(stream)
    Dim streamWriter As StreamWriter = New StreamWriter("C:\\download.docx")
    Dim line As String = streamReader.ReadLine()
    While (line <> Nothing)
        streamWriter.WriteLine(line)
        line = streamReader.ReadLine()
    End While
    streamReader.Close()
    streamWriter.Flush()
    streamWriter.Close()

My file is getting corrupted though. Any ideas on what I’m doing wrong?

And other question: has the support for downloading in doc been removed? I’ve read the documentation some weeks ago, and it was there (as well as in the user interface) but reading again, even though the “doc” option is there, there’s a note saying it will get downloaded as docx. Any way to download it as .doc?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T09:40:44+00:00Added an answer on June 11, 2026 at 9:40 am

    You should read and write it as binary, not as lines.

    You will always get a docx when requesting doc or docx. This is a recent change in the API, but it is in alignment with Microsoft’s policy to move away from the older binary formats. If you have older MS Office, you can download the compatibility pack to view docx.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using openxml to create Word DOCX files. I'd like to save these documents
Seeing as you can convert any document to a byte array and save it
Pre-compiled headers seem like they can save a lot of time in large projects,
I am actually using the library DocX to generate Word document (2007+) from .Net.
I have iCloud document sharing mostly working with Mac OS X; I can save
I am trying to using Word Automation to save a document to a network
Cross domain ajax requests are denied, but I can around it by this: $(document).ready(function
I'm using the Word 2007-component in C#. I want to save the Word document
in this code iam trying to save text document on server / wwwroot folder.
I'd like to make an XML document in JavaScript then have a save dialog

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.