With RPE you could generate the documents with the structure and formatting you need. However, if you want to compare contents of two different views from DOORS NG or test plan or test cases across different configuration or version, how would you?
RPE does not have an inbuilt solution for comparing documents. With the help of Microsoft Macro VB script, one could compare two documents to get representation of a third document that contains the differences between the two compared documents, and it is marked by using Track Changes. Continue reading “Document Comparison between configurations or versions or views”
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.
Continue reading “Embed attachments as OLEs in the RPE Word output”
With RPE 2.0.1 you can specify .docx as the extension for the output documents regardless of the stylesheet you are using. With 2.0 and older the generation process would fail if the stylesheet contained macros since .docx is a macro free Word document format.
To avoid this RPE 2.0.1 will remove all macros before saving the .docx file. This also means that any macro specified to be executed for the output will be ignored if the output extension is .docx. If you need macros in your output document you need to use one of the macro enabled document formats .doc or .docm.
RPE can produce Word documents that have the track changes feature enabled. What you need to do is use a doc/docx file with track changes enabled as the stylesheet for the Word output.
The content introduced by RPE in the document is not marked as a change but all further changes made by users are.
An example stylesheet is attached. trackedChanges.docx
RPE generates by default Word documents using the Word (.doc) Binary File Format. The decision is made base on the output path and default values from rpeconfig.xml. If no output path is specified, RPE will default to “doc” while if you specify a file path with the “docx” extension it’s DOCX you will get.
To control the behaviour of RPE when an output path was not specified you need to use “extension” property of the Word output defined in the rpeconfig.xml. By default the value of this property is “doc” and and it’s hidden. If you want to generate docx by default then you need to change the value attribute to docx.
Continue reading “Controlling the default Word file format in RPE”
“Allow tables to extend into margins” is a Microsoft Word property that I have recently discovered and has the potential of addressing a lot of formatting issues with large (wide) tables.
You can access this property from File->Options->Advanced under the compatibility options. The location is slightly misleading as you’d expect the properties here apply to the Word installation but that’s not the case, many are actually document properties.
Untick this option for better fitted tables
This property is disabled for newly created documents but old ones have it enabled which I assume it’s done for compatibility reasons. With this property disabled Microsoft Word will use a different algorithm when resizing tables, one in which the page widths acts as a soft cap for the table width. From what I observed Word uses more aggressive column resize algorithm which includes breaking cell content in the middle of words.
NOTE: the page width is finite so you can craft very large tables for which the columns will be resized beyond the point they are usable ( i.e. 1 character per column).
The RPE test is really simple: generate a document ( in .doc format) that contains a large table that overflow the page borders. Then generate it again but this time use the attached stylesheet and this time you will notice that the table fits the page margins. The example stylesheet is attached: emptyStylesheet
“Allow tables to extend into margins” is in a way a smart document level version of the table’s “autofit to content” property. The advantage is that it is global and that it kicks in only as needed.
Word macros allow document creators to correct document errors and fine tune the document formatting. Running the macros programatically through Word automation allows to automate the process for added benefits. There are a number of tools and processes that do this with RPE being one of them.
Running macros is limited to the Windows platform and it’s subject to additional limitations such as Word automation not being supported from NT Services ( as it’s the case for running RPE/RRDG running in WAS or Tomcat in Service mode).
To enable macros to run in situations where Word or Word automation is not available the solution is to execute the macros remotely by a dedicated service. Microsoft offers such a service in the form of Word Automation Services. Another solution, the one described in this article, is to a service that runs the macros through Word automation. The caveat of this service is that it cannot run as an NT service, it must run in an interactive desktop ( Apache Tomcat in console mode or node.js).
DISCLAIMER: The solution described in this article is provided as-is without warranty of any kind, express or implied. The service is not part of RPE and it is not supported by IBM.
Continue reading “A node.js service for running Word Macros remotely”