logo
search
File Cannot Open

Fix Office Web Viewer Not Opening DOCX or PPTX from Amazon S3

Steve KSteve K Oct 9, 2026 870 views

Question details

The user needs to resolve an issue where the Microsoft Office Web Viewer successfully displays XLSX files but fails to render DOCX and PPTX files hosted on Amazon S3 via presigned URLs.

How to Fix Office Web Viewer Not Opening DOCX or PPTX Files from Amazon S3
Product
Microsoft Office Web Viewer / Amazon S3
Device & OS
not provided
Scenario
Embedding Office document previews in a web page using Microsoft's web viewer combined with S3 presigned URLs.
Observed behavior
XLSX files render correctly in the viewer, but DOCX and PPTX files fail to display, often due to URL parsing, encoding, or permission issues.
Before you start

Verify that your Amazon S3 bucket permissions allow the files to be publicly reachable for the duration of the presigned URL, and ensure the original files are not corrupted by downloading and opening them locally.

Solution 1Recommended

Properly URL-Encode the Presigned S3 URL

Use this solution to ensure Microsoft's servers can correctly parse the complex query parameters included in an Amazon S3 presigned URL without cutting them off.

Amazon S3 presigned URLs contain multiple complex query parameters, such as access keys, signatures, and expiration timestamps. If these are not strictly URL-encoded before being passed to the Office Web Viewer, the viewer may truncate the URL, leading to rendering failures specifically for more complex formats like DOCX and PPTX.

1
Generate the S3 URL

Create your presigned URL in your backend application or AWS console as you normally would, ensuring the file path is correct.

2
Apply URL Encoding

Encode the entire presigned URL exactly once. If using JavaScript, apply encodeURIComponent(your_s3_url) before passing it to the viewer.

3
Append to Office Viewer URL

Pass the properly encoded URL to the viewer's source parameter like this: https://view.officeapps.live.com/op/embed.aspx?src=[ENCODED_URL].

Properly URL-Encode the Presigned S3 URL
Encoding Tip: Ensure you do not double-encode the URL, as this will also prevent Microsoft's servers from properly locating and downloading the file.
Free Microsoft Office alternative

View and Edit Office Documents Seamlessly with WPS Office

If you frequently encounter compatibility or server-side rendering issues with online viewers, consider using WPS Office. It provides a lightweight, highly compatible, and free alternative to Microsoft Office for opening, editing, and managing your documents across all platforms.

  1. 1. Download WPS Office: Visit the official WPS Office website and click the free download button for your operating system.
  2. 2. Install the Software: Run the setup file and follow the quick installation prompts to set up the software.
  3. 3. Open Your Files: Launch the application and drag-and-drop your DOCX, PPTX, or XLSX files into the workspace to view or edit them.
Highly compatible with Microsoft Office formats including DOCX, PPTX, and XLSX files.Free and lightweight alternative to Microsoft Office for offline and cloud document management.Avoid complicated web viewer encoding configurations by directly managing your files.Familiar user interface allows for seamless migration with no learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Office Web Viewer open XLSX files but fail on DOCX or PPTX?

DOCX and PPTX files often require the web viewer to process more complex XML structures and linked resources compared to lightweight spreadsheets. If the S3 URL is improperly encoded or missing correct content-type headers, the viewer may fail on these heavier formats while simpler XLSX files manage to load successfully.

How long should a presigned S3 URL be valid for the Office Viewer?

A presigned URL should remain valid for at least 15 to 30 minutes. Microsoft's remote servers must have enough time to request, download, and initiate the rendering of the document from your S3 bucket before the signature expires.

Does Office Web Viewer support authenticated or restricted S3 URLs?

No. The view.officeapps.live.com service requires the target document URL to be entirely public and accessible without session cookies. Any login redirects or authentication prompts will permanently block the viewer from accessing the document.