I have a question not entirely dissimilar to this one
We have the option to store equipment configuration option specs in a Word document and attach it as a blob to that configuration option record. These specs contained text, tables and/or pictures, all in one.
In the "old days" (pre-Word Layout) I tinkered a way to load these specs as Word building blocks (autotext); the user could then add these in the Word report after generation.Intended Change in Functionality
In the new structure with Word report layouts etc., we would like to use the Word layout to add these blobs to the Word layout, so that when an option is added to the configuration, the specs are automagically loaded and inserted at the placeholder.
For this, I would need to do two things:
1) Extract the content of the stored specs Word document or
store only the content of the specs Word document - this is doable;
2) Somehow insert the content at the location of the placeholder.Question
The question centers around aforementioned action no. 2: how do I insert that content (containing various elements) in that location at runtime?
In designing the Word layout, you need to insert the blob field as a text, RichText, picture, etc.
I can get the blob content in there as text, and even the Word content, but it's still xml and, naturally, text won't abide pictures and tables, so I will need to insert it at the xml level.
The merge process seems to take place in a closed NAV library (Microsoft.Dynamics.Nav.DocumentReport.WordReportManager), which means it's inaccessible code.
Any tips, hints or epiphanies?