Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Override Auto Spell Check in Lotus Notes from VBA

Status
Not open for further replies.

mdgouldkc

Technical User
Feb 2, 2006
1
US
I want to override the auto spell check in Lotus Notes when I send an email from Access 2002. I am using Lotus Notes 6.0.2.

My code works great unless the user has auto spell check turned on in Notes. Then the spell check stops the code and the user must continue with the spell check, or hit Send As Is, for the code to complete.

Since the Access database did the spell check before sending it to Notes, I want to override the auto spell check and force the email to Send As Is.

Does anyone have an idea how to do this in VBA?

I am using this code to send my email:

*** CODE START ***
' *** Purpose: Generate Email in Lotus Notes
360 Set NotesSession = CreateObject ("Notes.NotesSession")
370 Set NotesDatabase = NotesSession.GetDatabase("", "")
380 NotesDatabase.OPENMAIL
390 strServer = NotesDatabase.Server
400 strFileName = NotesDatabase.FilePath
410 Set NotesDatabase = Nothing
420 Set NotesSession = Nothing
430 Set NotesSession = CreateObject("Notes.NotesUIWorkspace")
440 Set NotesDocument = NotesSession.composedocument(strServer, strFileName, "Memo")
450 NotesDocument.InsertText strEmailToAddresses
460 NotesDocument.gotonextfield
470 If strEmailCCAddresses <> "" Then
480 NotesDocument.InsertText strEmailCCAddresses
490 End If
500 NotesDocument.gotonextfield
510 If strEmailBCCAddresses <> "" Then
520 NotesDocument.InsertText strEmailBCCAddresses
530 End If
540 NotesDocument.gotofield "Subject"
550 NotesDocument.InsertText strEmailSubject
560 NotesDocument.gotofield "Body"
570 NotesDocument.InsertText strBody
'*** Purpose: Set up the embedded object and attachment and attaches it
580 If Me.lstAttachmentReply.ItemsSelected.Count > 0 Then
590 Set ctl = Me![lstAttachmentReply]
600 Set NotesAttach = NotesDocument.Document.CreateRichTextItem("Attachment")
610 For Each itm In ctl.ItemsSelected
620 If ctl.ItemData(itm) Like "*:\*" Then
630 strAttachmentPath = ctl.ItemData(itm)
640 Else
650 strAttachmentPath = Forms!frmConfig!DBDataPath & "\WATTSAttachments\" & _
Me.txtIssueID & "\" & ctl.ItemData(itm)
660 End If
670 Set EmbedObj(itm) = NotesAttach.EmbedObject(1454, "Document", strAttachmentPath)
680 strAttachmentChain = strAttachmentChain & vbCrLf & "Included Attachment: " & ctl.ItemData(itm)
690 Next itm
700 Set itm = Nothing
710 Me.txtIssueNoteDetail = Me.txtIssueNoteDetail & vbCrLf & vbCrLf & strAttachmentChain
720 End If
723 NotesDocument.Document.SaveOptions = "1"
730 NotesDocument.Send
740 NotesDocument.Close
750 Set NotesAttach = Nothing
760 Set NotesDocument = Nothing
770 Set NotesDatabase = Nothing
780 Set NotesSession = Nothing
781 DoCmd.Close acForm, "frmLotusNotesAttachmentStatus"
782 MsgBox ("Email sent and saved."), vbOKOnly + vbInformation, ("Complete")
*** CODE END ***

Thanks
Matthew..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top