Enable Digital Signature Option in Email Generated from Access VBA

L

LEH

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
signed email and currently a message box is used to remind the user to select
this option once the email is displayed for their review. I'm not an expert
here but is there an option along the lines of:

..importance =
..votingbuttons = "Yes;No"

something like
..digitalsignature = True?
 
R

Ralph

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."
 
L

LEH

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top