我正在使用一些代码在电子邮件中插入最后一个剪贴板打印屏幕,但有没有办法选择最后3个打印屏幕?或者选择多个打印屏幕插入电子邮件?谢谢。
Sub clipboardcopy()
Dim OutApp As Object
Dim OutMail As Object
Dim olInsp As Object
Dim oRng As Object
On Error Resume Next
Set OutApp = GetObject(, "Outlook.Application")
If Err <> 0 Then Set OutApp = CreateObject("Outlook.Application")
On Error GoTo 0
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "PRINT SCREEN"
Set olInsp = .GetInspector
Set wdDoc = olInsp.WordEditor
Set oRng = wdDoc.Range
oRng.collapse 1
oRng.Paste
.Display
End With
Set OutMail = Nothing
Set OutApp = Nothing
Set olInsp = Nothing
Set wdDoc = Nothing
Set oRng = Nothing
End Sub
答案 0 :(得分:1)
答案 1 :(得分:1)
如果您想要多个打印屏幕,请将其附加到当前邮件,而不是创建新邮件。
这个想法看起来像这样。
WHERE CASE ... END = @variable1
AND CASE ... END = @variable2