troubleshooting Question

Change fonts in access vba to send mail in lotus notes

Avatar of Dian S
Dian S asked on
Microsoft AccessFonts TypographyVBA
6 Comments1 Solution197 ViewsLast Modified:
Hi ,

I know only basic vba.
I would like to send mail in lotus notes via microsoft access vba.
I found this code in the IBM website as example codes to change the fonts.

I copy paste to my script but it stopt on  "Dim session As New NotesSession" and error message is user-defined type is not defined.
Could you please help?
Many thanks

Sub Initialize
  Dim session As New NotesSession
  Dim db As NotesDatabase
  Set db = session.CurrentDatabase
  Dim doc As New NotesDocument(db)
  Call doc.AppendItemValue("From", session.UserName)
  Call doc.AppendItemValue("Subject",  _
  "Meeting time changed")
  Dim richStyle As NotesRichTextStyle
  Set richStyle = session.CreateRichTextStyle
  Dim richText As New NotesRichTextItem(doc, "Body")
  richStyle.NotesFont = FONT_HELV
  Call richText.AppendStyle(richStyle)
  Call richText.AppendText("The meeting is at ")
  richStyle.NotesFont = FONT_COURIER
  Call richText.AppendStyle(richStyle)
  Call richText.AppendText("3:00")
  richStyle.NotesFont = FONT_HELV
  Call richText.AppendStyle(richStyle)
  Call richText.AppendText(" not 2:00")
  Call doc.Save(True, False)
End Sub
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros