Is it possible to create action button from excel macro?
Subject: how to create action button form excel macro??
probably, what are you trying to do, specifically?
Subject: RE: how to create action button form excel macro??
can you provide more detail, where it will be used, what action it will carry out etc?
Subject: RE: how to create action button form excel macro??
I want to creat an action button in the email body. This is for the receipient to acknowledge the email contents and comment. The action button will provied a window to enter comments. These comments will mailed back to the sender.
I’m using the following code to generate the email in an excel macro.
Thanks!
Sub SendMail()
Dim notesdb As Object
Dim notesDoc As Object
Dim notesrtf As Object
Dim notespicture As PictureFormat
Dim mypicture As Object
Dim notessession As Object
Dim arrDistrib_to(50) As String
Dim arrDistrib_copy(50) As String
Set notessession = CreateObject(“Notes.Notessession”)
Set notesdb = notessession.GetDatabase(“”, “”)
Call notesdb.openmail
Rem make new mail message
Set notesDoc = notesdb.CreateDocument
num = Range(“ToList”).CurrentRegion.Rows.Count
For i = 0 To num
arrDistrib_to(i) = Range(“ToList”).Offset(i, 0).Value
Next i
Call notesDoc.replaceitemvalue(“Sendto”, arrDistrib_to)
num = Range(“CCList”).CurrentRegion.Rows.Count
For i = 0 To num
arrDistrib_copy(i) = Range(“CCList”).Offset(i, 0).Value
Next i
Call notesDoc.replaceitemvalue(“Copyto”, arrDistrib_copy)
mySubject = Range(“Note_Subject”)
Call notesDoc.replaceitemvalue(“Subject”, mySubject)
Set notesrtf = notesDoc.CreateRichTextItem(“body”)
myText = Range(“Body_text”).Cells(1, 1).Value
Call notesrtf.appendtext(myText)
myText = Range(“Body_text”).Cells(1, 1).Value
Call notesrtf.appendtext(myText)
Call notesrtf.AddNewLine(3)
myOutput1 = Range(“ToDir”) '& Range(“ToFolder”) & Range(“output1”)
Call notesrtf.EmbedObject(1454, “”, myOutput1)
Rem send message
Call notesDoc.Send(False)
Call notesDoc.Save(False, True)
Set notessession = Nothing
MsgBox “Mail sent, check Inbox!”
End Sub