How to Convert Linked Inline Pictures to Shapes using Word VBA
Question details
The user needs to convert an InlineShape of type wdInlineShapeLinkedPicture into a floating Shape using Word VBA, but the ConvertToShape method fails or does not apply text wrapping correctly.
- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Using a Word VBA macro to automate the conversion of images inserted via the INCLUDEPICTURE field from inline layouts to floating shapes with specific text wrapping.
- Observed behavior
- The ConvertToShape method successfully converts standard embedded pictures but fails or behaves unexpectedly when applied to linked inline pictures.
Always run and test your VBA macro changes on a duplicate copy of your Word document to prevent accidental formatting corruption or data loss.
Embed the Linked Picture Before Conversion
Since wdInlineShapeLinkedPicture objects do not fully support the ConvertToShape method, unlinking and embedding the picture first allows the VBA method to work as expected.
Linked pictures inserted via the INCLUDEPICTURE field handle text wrapping differently than standard embedded images. Word VBA's ConvertToShape method natively expects an embedded wdInlineShape object to correctly apply floating text wrap styles like Square, Tight, or Behind Text.
Select the linked picture in your Word document and press 'Ctrl + Shift + F9' to break the link and embed the picture directly into the document. Alternatively, use 'ActiveDocument.Fields.Unlink' in your macro.
Ensure your VBA code now targets the newly embedded InlineShape object instead of the linked picture.
Run 'InlineShape.ConvertToShape' in your macro to successfully convert the embedded image into a floating Shape.
Use the 'Shape.WrapFormat.Type' property in your VBA script to apply the desired wrapping style, such as 'wdWrapSquare' or 'wdWrapBehind'.
Insert the Image as an Embedded Object via VBA
Modify your VBA script to insert the picture as a standard embedded object from the start, bypassing the linked picture limitation entirely.
Try WPS Office for Seamless Document and Image Formatting
If you are tired of dealing with complex VBA errors and text wrapping restrictions in Word, WPS Office provides an intuitive interface for handling document layouts, floating shapes, and macros—completely free and highly compatible with Microsoft Office formats.
- 1. Download WPS Office: Visit the official WPS website and download the free WPS Office suite.
- 2. Open your Word Document: Launch WPS Writer and open your existing .docx file containing the macros and pictures.
- 3. Adjust Picture Layouts Easily: Click on any image and use the intuitive Layout Options menu to instantly change text wrapping to Square, Tight, or Behind Text without needing VBA.

Frequently Asked Questions
Why does Word VBA ConvertToShape fail on linked pictures?
The ConvertToShape method struggles with wdInlineShapeLinkedPicture objects because they rely on external file links (like the INCLUDEPICTURE field) rather than embedded document data, making it difficult for Word to assign a floating geometry layer.
How do I check if an InlineShape is a linked picture using VBA?
You can check the Type property of the InlineShape object. If 'InlineShape.Type = wdInlineShapeLinkedPicture', the image is linked rather than fully embedded.
What text wrapping styles are available for floating shapes in VBA?
Once an image is converted to a Shape, you can set its WrapFormat.Type to several constants, including wdWrapSquare, wdWrapTight, wdWrapThrough, wdWrapTopBottom, wdWrapBehind, and wdWrapFront.
Can I bulk convert all linked pictures to embedded pictures using VBA?
Yes, you can loop through the Fields collection in your ActiveDocument, find fields of type wdFieldIncludePicture, and use the '.Unlink' method to convert them into embedded pictures before running ConvertToShape.




