复制visio页面并将其粘贴到excel中作为图像 [英] Copying a visio page and pasting it in excel as an image

查看:108
本文介绍了复制visio页面并将其粘贴到excel中作为图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在visio页面中复制所有形状并将其粘贴到Excel中作为图像.该图像应该是visio绘图的紧密副本.寻找Excel vba脚本来执行此操作.我可以打开visio,访问形状信息等,但是只能复制和粘贴所有形状以将其作为单个图像来表现出色

I'm trying to copy all shapes in a visio page and paste it in Excel as an image. The image should be a close replica of the visio drawing. Looking for Excel vba script to do this. I'm able to open visio, access shapes information etc, but stuck in copying and pasting all shapes to excel as a single image

我尝试了以下操作:

 For j = 1 To intShapeCount  'Get count of shapes on page
        Set vsoConnectFrom = vsoShapes.Item(j)
        vsoConnectFrom.Copy(visCopyPasteNoTranslate)
        CIwb.Worksheets("Current FlowChart").Paste
  Next j

此代码将所有形状粘贴到一个点,并且形状未连接.因此,寻找可以复制所有形状并将其粘贴为excel的代码

This code is pasting all shapes to a single spot and the shapes are not connected. Hence looking for code that would just copy all shapes and paste as image into excel

推荐答案

'Assuming your page object is named vsoPage
'This embeds the visio drawing
vsoPage.CreateSelection(visSelTypeAll).Copy
CIwb.Worksheets("Current FlowChart").Paste

这篇关于复制visio页面并将其粘贴到excel中作为图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆