乔山办公网我们一直在努力
您的位置:乔山办公网 > excel表格制作 > Excel 怎样用<em>VBA</em>提取图片文件名-vba excel导出图片,vba导出

Excel 怎样用<em>VBA</em>提取图片文件名-vba excel导出图片,vba导出

作者:乔山办公网日期:

返回目录:excel表格制作


'需安装zd有打机"Microsoft Office Document Image Writer"
Sub test()
    On Error Resume Next
    Dim i As Integer
    For i = 1 To Sheets.Count
        Sheets(i).PrintOut ActivePrinter:="Microsoft Office Document Image Writer", PrToFileName:=Sheets(i).Name & ".mdi"
    Next
End Sub


Public Sub PicName()
Dim Pth As String
Dim Pic As String
ActiveSheet.Range("A1").Select  '选中激活窗口的A1
Pth = "C:\Users\Public\Pictures\Sample Pictures"
'路径,系统自带图copy片的地方
Pic = Dir(Pth & "\*.jpg")   '查看JPG格式的图片名称zhidao
Do While Pic <> ""
        Selection = Pic         '赋值
        Pic = Dir               
        Selection.Offset(1, 0).Select
Loop
End Sub

Excel 怎样通过VBA获取图片文件的像素属性

如下图代码所示:



Sub yy() Dim p As Shape, a$ For Each c In Range([a2], [a65536].End(3)) a = c.Value c(1, 2).CopyPicture With ActiveSheet.ChartObjects.Add(0, 0, c.Width, c.Height).Chart .Paste .Export "D:\picture\ " & a & ".jpg", "JPG" .Parent.Delete End With Next End Sub

相关阅读

关键词不能为空
极力推荐
  • <em>EXCEL</em>用<em>VBA</em>提<em&g

  • 可以使用函数提取一个字符串中的一段度字符。 MID 用来返回文本字符串中从指定位置开始知的特定数目的字符,该数目由用户指定,道 函数 MID 始终将每个字符。excel中的VBA的正则表达式

ppt怎么做_excel表格制作_office365_word文档_365办公网