View Full Version : Paste as text not BMP! in lotus notes
CuriousGeorg
10-03-2013, 12:51 AM
Good morning,
I Have a VBA code that copy and pastes certain fields into an email. The problem is it only copy's and pastes in BMP format.
Is there a way I can paste as text format?:thumb
LN8.5 by the way
Kenneth Hobs
10-03-2013, 06:42 AM
Without seeing code, it is hard to help. What fields?
If you just want to paste the clipboard contents as text, that can be done.
Pasting is not a route that I would choose.
Here are a few threads about LotusNotes by VBA.
http://www.vbaexpress.com/forum/showthread.php?35917-Solved-Using-Excel-To-Send-Emails-Through-Lotus-Notes
http://www.mrexcel.com/forum/excel-questions/518746-send-range-rich-text-body-through-lotus-notes.html
Code for Domino:
http://www.redbooks.ibm.com/redbooks/pdfs/sg245670.pdf#page=23&zoom=auto,6,626
http://www.alcs.ch/html-lotus-notes-email-including-html-signature-from-excel-with-vba.html#more-375
http://www.xtremevbtalk.com/showthread.php?t=320485
http://www-10.lotus.com/ldd/nd85forum.nsf/dba3ca7e515d55ff85256a0700727b35/95884ad3153d26e585257b790072eeb2?OpenDocument
CuriousGeorg
10-03-2013, 07:50 AM
ah yes apologies..
usually helps i guess.. I;ve used those guides before. Perhaps its my lack of understanding..
Private Sub cmdEmail_Click()
Dim NSession As Object
Dim NUIWorkSpace As Object
Dim NDatabase As Object
Dim NDoc As Object
Dim NUIdoc As Object
Dim Subject As String
Dim SendTo As String, CopyTo As String
Dim embedCells As Range
Dim ctl As Control
Dim strEmail As String
strEmail = Application.VLookup(cboRTM.Value, Worksheets("Raw").Range("Contacts"), 2, False)
'------------ User-defined settings section ------------
SendTo = strEmail
Subject = "Feedback"
Set embedCells = Sheets("Raw").Range("B1:G2")
'------------ End of user-defined settings ------------
Set NSession = CreateObject("Notes.NotesSession")
Set NUIWorkSpace = CreateObject("Notes.NotesUIWorkspace")
Set NDatabase = NSession.GetDatabase("", "")
If Not NDatabase.IsOpen Then NDatabase.OPENMAIL
Set NDoc = NDatabase.CreateDocument
With NDoc
.SendTo = SendTo
.CopyTo = CopyTo
.Subject = Subject
.body = "Please find attached New feedback" & vbLf & vbLf & _
"{IMAGE_PLACEHOLDER}" & vbLf & vbLf & _
"Regards"
.Save True, False
End With
Set NUIdoc = NUIWorkSpace.EDITDocument(True, NDoc)
With NUIdoc
.GotoField "Body"
.FINDSTRING "{IMAGE_PLACEHOLDER}"
.DESELECTALL
embedCells.CopyPicture xlBitmap
Selection.Paste
Application.CutCopyMode = False
End With
Set NSession = Nothing
Dim LastRow As Integer
LastRow = Worksheets("FULL data").Range("A65536").End(xlUp).Row
Sheets("Raw").Range("B2:G2").Cut Worksheets("Full Data").Cells(LastRow + 1, "A")
For Each ctl In Me.Controls
If TypeName(ctl) = "TextBox" Or TypeName(ctl) = "ComboBox" Then
ctl.Value = ""
ElseIf TypeName(ctl) = "CheckBox" Then
ctl.Value = False
End If
Next ctl
ThisWorkbook.Save
End Sub is what I'm using
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.