![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Is it possible to add captions to images in ReporterPLUS? Topic Summary: Created On: 20-Aug-2007 14:17 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|||
My document is generarting just fine and getting the pictures from the model, however, I'd like to add the caption just below the figure, similar to the following:
Figure 1: Foo Bar Block Definition Diagram I don't see any command in the context menu for this, is there some MS Word VBA needed to accomplish this? |
|||
![]() |
|||
![]() |
|||
Yes, you re right!
There is a solution where you have to export "tagged" information to the word document. E.g. write plain text: <caption> Foo Bar Block Definition Diagram </caption> to the word document. Then you can use a simple VBA script to convert the texte between the tags into a caption. Norbert |
|||
![]() |
|||
![]() |
|||
Thanks for the help. By the way, do you know where I could find a sample VBA script to do this? Is it similar to the VBA script given in the forum about changing the table styles?
|
|||
![]() |
|||
![]() |
|||
This is a little late, I know, but one of the projects here used the "insert file" command to insert a Microsoft Word file consisting solely of Figure, then a field with type StyleRef/Caption, a dash, another field of type Seq, then some filler text. After the insert file command, you put in the $name property in ReporterPlus. Afterwards, you'll need to search for the filler text, replace it with a blank, and regenerate the fields, but it works like a charm.
|
|||
![]() |
|||
![]() |
|||
Just to follow up, here is the solution we use here to provide captions to the generated documents. It does not apply the caption style and it's missing such niceties as preventing the caption from being separated from the image when pages wrap (this can be done manually by selecting the picture and setting the Paragraph settings to check "Keep with next"), but it works well enough for us.
In the Text block of the section where you're displaying the image: [INSERT PICTURE: filename =(«$path»), location =()][CR][INSERT FILE: filename = (Path to the attached file\Figure Caption.doc), asLink=FALSE]«$name» Diagram[CR][STYLE: NORMAL][ALIGNMENT: ALIGN LEFT][CR] After the file has generated, search for "@@Replace^p^p" and replace it with "". Basically, Rhapsody adds in two carriage returns between the inserted Word file and the text. The "@@Replace" is just a convenient bit of text unlikely to show up naturally in the document itself. You could just as easily use "ZZZZXXX" or something similar.
Edited: 23-May-2008 at 15:24 by Sean Duggan |
|||
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.