I modified the Function from Microsoft at this site:
http://support.microsoft.com/kb/279013/en-us
I chaneged it to Public Function Item_Send(item)
Sub SendDigiMail()
Dim olApp As New Outlook.Application
Dim olMsg As Outlook.MailItem
Dim retVal
Set olMsg = olApp.CreateItem(olMailItem)
With olMsg
.VotingOptions = True
.Importance = olImportanceLow
retVal = Item_Send(olMsg)
.Display
End With
End Sub
I don't have a digital signature so I get the message:
"You do not have a digital signature!" "This mail will not be sent."
> Is there a way to enable the Digital Signature option in an Outlook email
> message that is generated from Access VBA? The user must send a digitally
[quoted text clipped - 7 lines]
> something like
> .digitalsignature = True?
LEH - 10 Dec 2007 02:43 GMT
First, thanks for you help Ralph.
I am getting an error message in the function that states "Method 'Add' of
object 'CommandBarControls' failed" when it reaches this line: Set
oDigSignCtl = oCBs.item("Standard").Controls.Add(, 719, , , True). I saw
other posts where this message was received and it had to do with turning off
the protection for the control.
The email message created has the digital signature and encryption controls
/ icons already and I want to enable the digital signature button. Since the
icons are there does the digital signature just need enabled? Could this be
why the Add is erroring because the control is already there? If so how
would the code change?
Also, When the code runs it returns nothing for this line in the function -
this might be normal I dont know:
"Set oDigSignCtl = item.GetInspector.CommandBars.FindControl(, 719)
Does this mean that the control# is not 719?
> I modified the Function from Microsoft at this site:
> http://support.microsoft.com/kb/279013/en-us
[quoted text clipped - 29 lines]
> > something like
> > .digitalsignature = True?