Support #25926
openEmbedding Microsoft documents
0%
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
Updated by Boone Gorges 2 days 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?
Updated by Raymond Hoh 1 day 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.
Updated by scott voth 1 day 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.
Updated by Raymond Hoh 1 day 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?
Updated by scott voth about 18 hours 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