Word Reports
ImageTextWrapping Property
Example 



KellermanSoftware.WordReports Namespace > ReplacementItem Class : ImageTextWrapping Property
If Value is Image then wrapping is set here. Default is InLineWithText.
Syntax
Public Property ImageTextWrapping As TextWrapping
Dim instance As ReplacementItem
Dim value As TextWrapping
 
instance.ImageTextWrapping = value
 
value = instance.ImageTextWrapping
public TextWrapping ImageTextWrapping {get; set;}
public:
property TextWrapping ImageTextWrapping {
   TextWrapping get();
   void set (    TextWrapping value);
}
Example
//To run this example code, create a word document called TextWrappingSourceDocumentation.docx with the text [Image] in the document
 
WordReportsGenerator generator = new WordReportsGenerator(); //Trial Mode
//WordReportsGenerator generator = new WordReportsGenerator("place user name here", "place license key here"); //License Mode
 
const string sourceDocumentPath = @"Test Documents\TextWrappingSourceDocumentation.docx";
const string outputDocumentPath = "ImageDocumentationTest.docx";
const string imagePath = @"Test Documents\KellermanSoftwareImage.png";
 
Dictionary<string, ReplacementItem> replacement =
    new Dictionary<string, ReplacementItem>
        {
            {
                "[Image]",
                new ReplacementItem 
                    { 
                        Value = Image.FromFile(imagePath),
                        ImageTextWrapping = TextWrapping.Square
                    }
            }
        };
 
generator.GenerateWordReport(sourceDocumentPath,
                              outputDocumentPath,
                              replacement);
'To run this example code, create a word document called TextWrappingSourceDocumentation.docx with the text [Image] in the document
 
Dim generator As New WordReportsGenerator() 'Trial Mode
'WordReportsGenerator generator = new WordReportsGenerator("place user name here", "place license key here"); //License Mode
 
Const sourceDocumentPath As String = "Test Documents\TextWrappingSourceDocumentation.docx"
Const outputDocumentPath As String = "ImageDocumentationTest.docx"
Const imagePath As String = "Test Documents\KellermanSoftwareImage.png"
 
Dim replacement As New Dictionary(Of String, ReplacementItem)() From {{ "[Image]", New ReplacementItem With {.Value = Image.FromFile(imagePath), .ImageTextWrapping = TextWrapping.Square} }}
 
generator.GenerateWordReport(sourceDocumentPath, outputDocumentPath, replacement)
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ReplacementItem Class
ReplacementItem Members