Project

General

Profile

Actions

Support #25926

closed

Embedding Microsoft documents

Added by scott voth about 1 month ago. Updated 26 days ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
WordPress Plugins
Target version:
-
Start date:
2026-10-21
Due date:
% Done:

0%

Estimated time:
Deployment actions:

Description

Kareena Khan and Jean Kelley report problems with embedding Microsoft docs into posts in the Pedagogies of Place (https://teachqueens26.commons.gc.cuny.edu/ site). The Embed Any Document isn't working. She chose Microsoft Online Viewer and Google Docs viewer several times and neither worked. The resulting page displays "No preview available" message.

I asked them to try the EmbedPress plugin, but that didn't work either. I spent some time trying to get EmbedPress to work also, but was unsuccessful. See https://aatwenty.commons.gc.cuny.edu/testing-embed/

I tried generating a shortcode - shortcode was successfully generated but content did not show up. I tried using the EmbedPress block "Embed a Document" which looked good in the editor, but didn't display (Block contains Errors). I also tried shortening the file name but that didn't help.

Attached is the file the members are trying to embed.


Files

Actions #1

Updated by Boone Gorges about 1 month ago

  • Assignee changed from Boone Gorges to Raymond Hoh

Ray, can you advise? Does any of your work on Google embedding dovetail with Microsoft's tools?

Actions #2

Updated by Raymond Hoh about 1 month ago

The Embed Any Document plugin is working. I've embedded the .docx file on the following page for testing: https://teachqueens26.commons.gc.cuny.edu/2018/10/14/new-announcement/

To use Embed Any Document, you need to use the "Document" block. Then, you should be able to upload the .docx file and it should embed. One thing to note is if the site ever decides to change their site privacy to one of the following settings:

  • I would like my site to be visible only to registered users of the CUNY Academic Commons
  • I would like my site to be visible only to users I add to it
  • I would like my site to be visible only to its Admins

The embed will no longer work as the file has to be publicly-accessible to be embedded.


I did create a OneDrive plugin for another site, but that might be overkill for this one particular instance. See #17739.

Actions #3

Updated by scott voth about 1 month ago

Ray - Thanks for your work on this.

I think in the between the time this ticket was created, the site went live and that may be the issue. Or else, the Document block was not used correctly. I confirm that it is now working for the site.

It's good to know that these types of embeds only work with public sites.

I'm still puzzled why EmbedPress doesn't work with MS docs. If I go with the shortcode generator, the shortcode generated seems to work, but then it gives a block error. If instead I click on file types in the sidebar, the MS docs option gives a 404 - see https://aatwenty.commons.gc.cuny.edu/testing-embed/

Just want to get the documentation updated so we don't have these issues.

Actions #4

Updated by Raymond Hoh about 1 month ago

I think in the between the time this ticket was created, the site went live and that may be the issue. Or else, the Document block was not used correctly. I confirm that it is now working for the site.

Yeah, that could've been the case. When I checked the site, they did deactivate the Embed Any Document plugin probably after they could not get the plugin working.

I'm still puzzled why EmbedPress doesn't work with MS docs.

I would recommend using the "EmbedPress Document" block. It works very similar to Embed Any Document's "Document" block.

Using the shortcode method would require knowing the exact Amazon S3 attachment URL. Scott, can you tell me which URL you were testing with when using the EmbedPress shortcode?

Actions #5

Updated by scott voth about 1 month ago

I was using this: [embedpress]https://s3.amazonaws.com/files.commons.gc.cuny.edu/wp-content/blogs.dir/20747/files/2026/10/AI-Agent.docx[/embedpress] on this test page: https://aatwenty.commons.gc.cuny.edu/wp-admin/post.php?post=209&action=edit

Actions #6

Updated by Raymond Hoh about 1 month ago

Scott, for the EmbedPress shortcode to work with documents, you need to change the shortcode to [embedpress_doc]. I've just edited your example page to use this shortcode.

Here are the full parameters for the [embedpress_doc] shortcode:
  • width - Defaults to the size under the "EmbedPress > Settings" admin page. Size is in pixels. Omit the 'px'.
  • height - Defaults to the size under the "EmbedPress > Settings" admin page. Size is in pixels. Omit the 'px'.
  • viewer - Defaults to 'custom', which will automatically select the best viewer to use (either Microsoft Office or Google's). Set to 'google' to force Google's document viewer.
  • powered_by - Whether to show EmbedPress branding after the embed. Defaults to the setting under the "EmbedPress > Branding" admin page. Set to 'no' to disable the branding.

I've also added the "EmbedPress Document" block directly after the shortcode if that helps with adding that as another option for your documentation.

Actions #7

Updated by scott voth 26 days ago

Thanks for this Ray! I have updated our documentation.

Actions #8

Updated by scott voth 26 days ago

  • Status changed from New to Resolved
Actions

Also available in: Atom PDF