以下是引用龙族天堂在2005-2-21 13:47:00的发言:
斑竹:
还有什么方法吗?
用此法应该没有问题:
'* +++++++++++++++++++++++++++++
'* Created By I Love You_Word!@ExcelHome 2005-2-21 14:10:59
'仅测试于System: Windows NT Word: 10.0 Language: 2052
'^The Code CopyIn [标准模块-模块2]^'
'* -----------------------------
Sub Example()
Dim aShape As InlineShape, I As Integer, PicName As String
' On Error Resume Next
Application.ScreenUpdating = False
For Each aShape In ActiveDocument.InlineShapes
Shell "MSPAINT.exe", 1 '运行指定绘图程序
I = I + 1 '累计
PicName = ActiveDocument.Path & "\" & I & ".JPG" '设置一个路径和文件名
aShape.Select '选中
Selection.Copy '复制
SendKeys "^v{Enter}", True '发送CTRL+V(粘贴快捷键),对出现的对话框进行确认
SendKeys "%fa", True '打开另存为
SendKeys PicName & "{Enter}", True '保存为*.JPG格式
SendKeys "%{F4}", True '退出画图程序
Next
Application.ScreenUpdating = True
End Sub
'----------------------
显然此法较以上方法,是在反复开关绘图程序,通常不提倡,但既然行不通,则好这样了。请楼主再试一下。 |