View Full Version : Paste a string
ProteanBeing
03-24-2010, 10:41 AM
I would like to build (a large) string from multiple cells so I can paste the results in a email. I know how to build a string but how do I "copy" it to the clipboard to paste in another program?
mdmackillop
03-24-2010, 10:52 AM
Look up PutInClipboard in VBA help
ProteanBeing
08-05-2010, 10:11 AM
This only works in forms. Need it to work in sheet
Tinbendr
08-05-2010, 11:36 AM
Assign it to the Body or HTMLBody property.
Snippet Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
.BodyFormat = olFormatHTML
.To = EmailName
.Subject = "Outstanding Reports"
'Build WholeMessage from Cells or Array.
.HTMLBody = WholeMessage$
.Display
'.Send
End With
If bStarted Then
oOutlookApp.Quit
End If
Set oItem = Nothing
Set oOutlookApp = Nothing
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.