User's Guide > About the User's Guide > Word and Excel Templates > Word Templates in CB 7.2 - 9.2 > How to List Comments and Attachments of Requirements-Bugs and Other Kind of Exported Items
How to List Comments and Attachments of Requirements-Bugs and Other Kind of Exported Items
To list the comments and attachments of the exported items add this piece of Velocity macro to the "properties" part of the export template (where the associations/relations are rendered too...)This will add a link for each attachments of the exported item, and when clicking on this link in Word that will open a browser and show the content of the attachment.
The attachments won't be embedded to the Word document, so when clicking on the link it will need a direct access and authentication to the Codebeamer server.


<br/>

#if(${describable.attachments})

<br>Attachments:</b><br/>

<ul>

#foreach($att in ${describable.attachments})

#set ($url = ˶${cbBaseUrl}/rest/item/${describable.id}/attachment/${att.id}ˮ)

<li>

#if($att.fileSize)

<a href=̋${url}̋>${att.name}</a>

#else

## this is a comment, print out owner and creation date and description text as plain text

${att.owner.name} - ${att.createdAt}

<br/>${att.description}</li>

#end

#end

</ul>

#end

Was this helpful?