This is a guest post by my colleague Subramanya Pilar from the RPE FVT team.
Hyperlinks are a simple and convenient way to attach additional data to a document. There are however scenarios where embedding the content as OLE objects is more useful:
- the document is self contained, you can transfer the documents with embedded objects to other computers or mail them without breaking any link.
- you can edit the embedded objects without changing the content of the source.
- embedded objects can be edited without having to work in a separate window.
Rational Publishing Engine supports creating such documents. The attachment can be of any format supported by Microsoft Word for embedding .xls, .pdf, .doc, .docx are examples of such documents.
The files are downloaded during document generation and the local file path is used as the hyperlink address in RPE. Using a post processing macro iterates the Hyperlinks and inserts the corresponding files as OLE objects. The layout of the document is not changed in the process.
- Configure the document specification.
- Set variable attachmentsPath to location where the files to be downloaded. By default, it is C:\Attachments
- Set RQM Username and Password to qmUser, qmPassWord variables
- Copy RQMUrlUtility.jar ( source is https://jazz.net/wiki/bin/view/Main/RQMURLUtility ) and GetAttachment.vbs to the location set in attachmentsPath variable.
The example template, docspec and the utility jar and scripts are available on the DevWorks Wiki here.