Home › Forums › DITA and XMetaL Discussion › How to insert a link to a MS Outlook Email Template into a Task Topic? › Reply To: How to insert a link to a MS Outlook Email Template into a Task Topic?
Reply to: How to insert a link to a MS Outlook Email Template into a Task Topic?May 31, 2019 at 11:17 pm
DITA supports linking to any file type.
However, what happens when the user clicks on a link to that file will depend on what format you are transforming to, what the DITA Open Toolkit creates for that link in that particular output, which application the person viewing/reading that particular output is using, and how that application (maybe a browser, but possibly also the OS, antivirus, etc) deals with the link when that person clicks on it, and whether the user has the right software installed to open and use an OFT file (ie: they have MS Outlook installed or some other software capable of using that file). Best case scenario is that it might be automatically associated with the right software like Outlook and opened. Worst case scenario is that nothing happens or the application tells the user it doesn't know what to do with an OFT file. Medium case scenario is that the application tells the user it doesn't know what to do and simply offers to save the file, or perhaps locate some software that can open it.
Lots of variables there, but perhaps some of them are within your control.
First thing I'd try is this:
1. Figure out where you are going to save the OFT file. This will either need to be a permanent location or travel with the other file you are outputting from this particular DITA task (ie: full path, or URL, or relative path).
2. Create a link from the task to the OFT file: Insert > Link > File Reference, browse to and select the OFT file. Or if the file will live on a web server then use: Insert > Link > Web Link.
3. Generate output for the task (using whatever output format you need it to be in) and see if it does what you need under whichever test conditions the person reading your output content will be using.
The following works under these specific conditions for me on Windows:
2. Generate output in HTML form using the default DITA OT. Most people are generating some form of HTML (CHM, HTML, Java Help, etc, so this is my assumption).
3. Open the resulting HTML file in a browser.
4. In the HTML (in the browser) click on the link to the OFT file. Some versions of IE will just try to open the file, some will trigger a security warning, some will prompt you to save and / or scan for viruses then might offer to open the file. Other browsers should do similar things.
5. If whatever happens in #4 triggers the file to be opened then it might open. I have MS Outlook installed and it is associated with these files so opens the OFT file.
Note 1: The DITA specs are a bit vague on which @scope value is correct for this particular case, but the DITA OT generates a link (at least in HTML) that browsers seem to deal with in a somewhat expected way in both cases. That expected way (for me) is that because the browser itself can't open the file it either offers to save it somewhere on my system, or it saves a temp copy and offers to open it in an application or my choosing, or it saves a temp copy and then automatically opens it in MS Outlook (if I have it installed).
If all that works then you might be done — assuming all the people reading that topic in its output form have a similar setup.
If it doesn't work then you might need to adjust attributes for the
If things beyond how output is generated need to be modified, or controlled, I don't know that there is much else you can do unless this is part of some internal system and you can force people reading the file to follow some procedure and configure their computers a specific way. ie: If the person reading your output doesn't have or refuses to install MS Outlook what do you want them to do instead?