I have cropped Shape from one side when paste word table as enchanced metafile.

2025-12-08T15:22:41.6466667+00:00

I copy table as picture and paste in another document with method PasteSpecial DataType:=wdPasteEnhancedMetafile and take a Shape object with righ side cropped. When i click on it with mouse right button and chose Edit image - it fixed. Also it helpful when use option Adjust the size after Edit image. I tried to use ActiveDocument.Shapes(1).Select Application.CommandBars.ExecuteMso("EditPicture") but it doesn't work in that case with error Invalid procedure call or wrong argumen? How can i fix my image? Tnx.

Microsoft 365 and Office | Word | For home | Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Q&A Assist
    2025-12-08T15:23:06.7333333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To fix the issue with the cropped shape when pasting a Word table as an enhanced metafile, you can try the following steps:

    1. Edit the Image: As you've mentioned, right-clicking on the shape and selecting "Edit Image" seems to resolve the cropping issue. This is a valid workaround.
    2. Adjust Size: Using the option to "Adjust the size after Edit image" can also help in correcting the appearance of the shape.
    3. VBA Code: If you're trying to automate this with VBA and encountering the error with Application.CommandBars.ExecuteMso("EditPicture"), ensure that the shape you're trying to edit is indeed selected and that it supports the edit operation. You might need to check the type of shape and ensure it's compatible with the command you're trying to execute.

    If the shape is still not behaving as expected, consider checking the wrapping style of the shape or any other properties that might affect its display.

    Unfortunately, the specific error you're encountering with ActiveDocument.Shapes(1).Select might require further debugging of the code or checking if the shape is properly referenced in your document.


    References:

    0 comments No comments

  2. Marcelo Mendoza 10,375 Reputation points Independent Advisor
    2025-12-08T16:43:59.8166667+00:00

    Hello, 

      

    Thanks for the workflow details and the VBA call for pasting your Word table as an enhanced metafile. 

      

    I see that right-clicking, choosing Edit Image and resizing works as a temporary fix. Also I get that Application.CommandBars.ExecuteMso(EditPicture) on ActiveDocument.Shapes(1) gives you an invalid procedure call error. It sucks when the manual fix works but the macro for it doesn’t especially since Word deals with pictures and shapes differently. 

      

    Basically the paste might not support the command or it’s the wrong type of object. Word has InlineShapes and floating Shapes and commands like ExecuteMso only work when the right one is selected. 

      

    To avoid cropping try pasting the table inline first. Then either leave it inline or make it a floating Shape and reset its crop using the PictureFormat API. You can use PasteSpecial to paste it as wdPasteEnhancedMetafile with Placement:=wdInLine. After that set the crop values to zero using PictureFormat.Crop properties for consistency across different Word versions. 

      

    If you want a floating layout turn it into a Shape and adjust WrapFormat. Check out Microsoft Learn for info on PasteSpecial, WrapFormat and PictureFormat.Crop. 

      

    Another way is to paste it as an enhanced metafile inline. Word will treat it as an InlineShape so you can then normalize the cropping by setting PictureFormat.Crop properties to zero. If you need it to float convert it to a Shape using InlineShapes(…).ConvertToShape and set Shape.WrapFormat.Type to wdWrapSquare (or something else). 

      

    Hope this helps! Let me know if you have other questions. 

      

    Regards, 

      

    Marcelo 

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.