Copy paste of the shapes are not working

Started by harsha652, August 04, 2014, 12:54:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

harsha652

Hi,

Visio is getting hanged while performing the below operation.

currentShape.Copy (Visio.VisCutCopyPasteCodes.visCopyPasteNoTranslate)
newPage.Paste (Visio.VisCutCopyPasteCodes.visCopyPasteNoTranslate)

JuneTheSecond

No reply?

Your macro works.

Try next.


Option Explicit

Sub test()

Dim currentShape As Visio.Shape
Dim newPage As Visio.Page

Set currentShape = ActivePage.Shapes(1)
Set newPage = ActiveDocument.Pages.Add
currentShape.Copy (Visio.VisCutCopyPasteCodes.visCopyPasteNoTranslate)
newPage.Paste (Visio.VisCutCopyPasteCodes.visCopyPasteNoTranslate)

End Sub




Best Regards,

Junichi Yoda
http://june.minibird.jp/