'图片保存为word
Dim MyWord As Object
Dim NewDoc As Object
Picture4.Width = 11955
Picture4.Height = 3735
BitBlt Picture4.hDC, 0, 0, Picture4.Width, Picture4.Height, Picture1.hDC, 10, 140, vbSrcCopy
Picture4.Picture = Picture4.Image
Set MyWord = CreateObject("Word.Application") '创建一个word对象
MyWord.Caption = "频谱"
Set NewDoc = MyWord.Documents.Add
Sleep 1000
Clipboard.Clear '清除剪贴板
Clipboard.SetData Picture4.Image, 2 'vbCFBitmap 图片框中图片装入剪贴板
MyWord.Visible = True
Sleep 1000
MyWord.Selection.Paste '将剪贴板中的图像复制到Word文档中
Clipboard.Clear '清除剪贴板
Set NewDoc = Nothing
Set MyWord = Nothing '清除对象
'保存为bmp
Private Declare Function BitBlt Lib "gdi32" _
(ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, _
ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, _
ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Const SRCCOPY = &HCC0020
For i = 1 To 10000 '延时
DoEvents
Next i
BitBlt Picture2.hDC, 720, 7200, 6755, 9855, GetDC(0), 0, 0, SRCCOPY
SavePicture Picture2.Image, "sss.bmp"