Log In
[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Collapse]Rich Text Editor
   [Expand]Getting Started
     Supported Document Formats
     [Collapse]Field Codes
     [Expand]Format Switches
      Field Structure
      Inserting a Field
      Field Display Modes
      Updating a Field
      Field Types
     Layout API
     Product Class Structure
     Default Keyboard Shortcuts
     Measure Units
     HTML Tag Interpretation
   [Expand]Visual Elements
   [Expand]Member Tables
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation



Mixed field

{ INCLUDEPICTURE "picture's URI" [\d] }

Inserts the picture retrieved from the specified URI.

The \d switch enables you to not store the image in a document file. For example, the {INCLUDEPICTURE "C:\\TMP\\Mypicture.png" \d} field retains a link to the picture, but the picture itself is not included in the saved document. This switch is useful for storing document templates, which retrieve images from an external source, such as a database.

When a field is updated, the IUriStreamService.GetStream method is called. This method calls the IUriStreamProvider.GetStream methods of registered providers to obtain a stream of image data. Subsequent calls are made until a successful result is obtained. The order of calls is the order in which providers registered. By default, there is only one provider that enables you to load an image from the specified URI by performing a web request.

This stream is used by internal RichEdit objects to create a OfficeImage instance via the OfficeImage.CreateImage method.

You can create a class implementing the IUriStreamProvider interface and define the IUriStreamProvider.GetStream method as required to provide image data for a custom URI, which can be a string in your own arbitrary format.

How would you rate this topic?​​​​​​​