Can I prevent Office Embed Macro from being used when creating a simple link to an MS Office doc
Asked by Steve McMillen:

In a recent upgrade of confluence, an obnoxious behavior started occurring when I try to create a simple link to an office document (Excel, Word, PPT) while in the Editor.

Before... If I type "!" and choose an office doc to link or I drag an office doc from my desktop into an editor window, Confluence used to create a simple link to the doc --- ahh, life was good!

But now... when I perform the same, confluence assumes I want to embed the "live view" document into the page and inserts the office macro - uggh! I don't seem to have an option to create a simple link w/o going thru the "Add" menu and choosing link. Then in the modal dialog I can choose the office doc I want to create a link for an I get what I wanted - a simple link.

While this behavior is generally desired for images (so this makes perfect sense), I really don't think that it's the modus operandi for embedding office docs for most users.

Is there any way that I can instruct confluence NOT to embed the office doc but rather to create a simple link? Ideally at the user preference level AND an option to make this change globally.

PLEASE PLEASE a solution. This is a realy workflow annoyance!

Thanks!


Answers:
author: Sean King
body: When you're creating a link you do not want to use "!". That is the syntax for creating images or attaching multimedia. You want to use "\[" instead.

Or a better idea is to probably click the link button/icon and select "Attachments". you can either upload the file there or select an already uploaded file.

If you don't use the link menu or preattach the document before you're in the editing screen confluence tries to help you out by displaying the document instead of linking to it just like images. There's no way to turn that off to my knowledge.

comments: author: Steve McMillen
body: Turns out I was using the wrong attachment shortcut!!

As Sean notes, "!" is for images - or I guess to embed anything in the same way an image is embedded. So when you use "!" for a word doc, it shows inline.

If I instead use \[ and type the word doc, I end up getting a simple link inserted. I still needed to undo the drag and drop operation which, for word docs, shows things inline - but I guess that's because the common use case is to drop images into the doc.


author: PeterKoczan
body: Hi,

You may want to look at **Confluence Admin \> Plugins (Manage Add-ons) \> Show System Plugins \> Office Connector**, expand it and find the plugin modules there. If you play with disabling various modules you may get what you want, preventing the links to be converted.

Optionally you may also use the html-include macro where you'd be able to construct regular HTML hyperlinks (\<a href="linked_document"\>link text\</a\>).

Kind regards,

Peter

comments: author: Steve McMillen
body: None of the settings in the configuration page for the Office Connector plugin appear to have anything to do with this behavior in the editor. Under the Office Connector plugin I see a 82/83 modules that are enabled - only some of which can be disabled. I've reivewed them and the [Office Connector documentation](https://confluence.atlassian.com/display/DOC/Configuring+the+Office+Connector) as well as the [View File Macro](https://confluence.atlassian.com/display/DOC/View+File+Macro) (which seems to be related) and nothing there seems to suggest modfying behavior related to automatically invoking the view macro vs. just creating a link. The viewdoc, viewxls macros seems related but I don't want to disable their functionality entirely - I just want to change the default for embedding them with drag and drop and the link button.

Hopefully someone out there knows and can explain how to control this functionality.