Error with Shape.ReplaceShape method

Jeanne 96 Reputation points
2020-12-08T20:39:18.84+00:00

Hi all,

I am working on replacing shapes (shp) with a saved master (mst) in My Shapes. Shape.ReplaceShape method was used. From the watch window, both shp and mst have correct values and types. However, invalid parameter error was received. I searched help document and googled but couldn’t find any help.
Thank you in advance.

Jeanne

46170-capture.png

Microsoft 365 and Office | Visio | For business | Windows
0 comments No comments
{count} votes

Accepted answer
  1. Jeanne 96 Reputation points
    2020-12-09T01:59:11.667+00:00

    This issue was solved. The new shape must has same connection ports as the shape to be replaced.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2020-12-08T20:48:45.353+00:00

    Might try them over here in dedicated office development forums.
    https://social.msdn.microsoft.com/Forums/Lync/en-US/home?category=officedev

    --please don't forget to Accept as answer if the reply is helpful--


Your answer

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