A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Indicate auto-generated email not to be spell checked?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old March 17th 07, 07:44 PM posted to microsoft.public.outlook.program_vba
ArchieDog via OfficeKB.com
external usenet poster
 
Posts: 1
Default Indicate auto-generated email not to be spell checked?

Hi All

I'm trying to send a legitimate (i.e. not Spam) email from Word via Outlook
but falling foul of the security warning ("A program is trying to send etc.").
I've had a certain amount of success using SendKeys from Word to deal with
this but would like to know if it is possible to indicate to Outlook that the
message does not need to be spell checked. I can use SendKeys to deal with
this too but then that assumes that the message will always contain words
that Outlook doesn't recognise.

I'm using the following code:

Sub Send_Message(strWhoTo As String, strSubject As String, strFileName As
String, Optional strBodyText As String)
Dim msMAPI As Outlook.Namespace
Dim objOutbox As Outlook.MAPIFolder
Dim objNewMessage As Outlook.MailItem
Dim Message As Integer

If Tasks.Exists("Microsoft Outlook") = True Then

Set msMAPI = Outlook.GetNamespace("MAPI")
Set objOutbox = msMAPI.GetDefaultFolder(olFolderOutbox)
Set objNewMessage = objOutbox.Items.Add

With objNewMessage

.To = strWhoTo
.Subject = strSubject
.Body = strBodyText

If strFileName "" Then

If Dir(strFileName) "" Then
.Attachments.Add strFileName
End If

End If

.Send

'if the security warning becomes a problem then can this
.Display
SendKeys "^{ENTER}"
'these lines deal with the spell checker so would need to be sure
that it was always going to run
SendKeys "{ESC}"
SendKeys "^{ENTER}"

End With

End if
End Sub

Thanks in advance for any help.

ArchieD

--
Message posted via http://www.officekb.com

Ads
  #2  
Old March 19th 07, 08:45 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Indicate auto-generated email not to be spell checked?

The security prompt has nothing to do with the spellchecker.
See http://www.outlookcode.com/d/sec.htm

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"ArchieDog via OfficeKB.com" u3408@uwe wrote in message
news:6f53e7c0a9b5b@uwe...
Hi All

I'm trying to send a legitimate (i.e. not Spam) email from Word via
Outlook
but falling foul of the security warning ("A program is trying to send
etc.").
I've had a certain amount of success using SendKeys from Word to deal with
this but would like to know if it is possible to indicate to Outlook that
the
message does not need to be spell checked. I can use SendKeys to deal
with
this too but then that assumes that the message will always contain words
that Outlook doesn't recognise.

I'm using the following code:

Sub Send_Message(strWhoTo As String, strSubject As String, strFileName As
String, Optional strBodyText As String)
Dim msMAPI As Outlook.Namespace
Dim objOutbox As Outlook.MAPIFolder
Dim objNewMessage As Outlook.MailItem
Dim Message As Integer

If Tasks.Exists("Microsoft Outlook") = True Then

Set msMAPI = Outlook.GetNamespace("MAPI")
Set objOutbox = msMAPI.GetDefaultFolder(olFolderOutbox)
Set objNewMessage = objOutbox.Items.Add

With objNewMessage

.To = strWhoTo
.Subject = strSubject
.Body = strBodyText

If strFileName "" Then

If Dir(strFileName) "" Then
.Attachments.Add strFileName
End If

End If

.Send

'if the security warning becomes a problem then can this
.Display
SendKeys "^{ENTER}"
'these lines deal with the spell checker so would need to be sure
that it was always going to run
SendKeys "{ESC}"
SendKeys "^{ENTER}"

End With

End if
End Sub

Thanks in advance for any help.

ArchieD

--
Message posted via http://www.officekb.com



  #3  
Old March 19th 07, 09:00 AM posted to microsoft.public.outlook.program_vba
debbieprobert via OfficeKB.com
external usenet poster
 
Posts: 1
Default Indicate auto-generated email not to be spell checked?

Hi Dmitry

Thanks very much for your response. I can get past the security issue by
using SendKeys. However, I want the message to run unattended and using the
SendKeys method means that when I get past the security prompt & send the
keys to make Outlook send the message, the spell checker kicks in. I suspect
that I'm going to have to use something like ClickYes to achieve this but, if
I could just prevent the spell checker running for the message - as you can
in Word by marking text not to be spell checked. - then I would be able to do
without a third party product. Unfortunately, using a third party product
will mean evaluation by IT, gaining authorisation, appointing a committee etc.
etc. ... need I go on?

ArchieD



Dmitry Streblechenko wrote:
The security prompt has nothing to do with the spellchecker.
See http://www.outlookcode.com/d/sec.htm

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

Hi All

[quoted text clipped - 57 lines]

ArchieD


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...g-vba/200703/1

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
POP3 doesn't require SPA, but email client cant connect if SPA is not checked [email protected] Outlook - General Queries 2 December 26th 06 08:32 PM
Retrieve the Email address from an automatically generated delivered/read message. Gordon Filby Outlook and VBA 6 July 7th 06 08:14 PM
when I start outlook in office 2003 my mail is not auto checked les006 Outlook - General Queries 1 July 7th 06 03:50 AM
No new email sounds, checked all the right boxes in OE and new mail notification in control panel!!! Sandy Outlook Express 9 May 23rd 06 12:22 PM
stop responding spell checking email Alan Smithee Jr. Outlook - General Queries 4 February 6th 06 07:32 PM


All times are GMT +1. The time now is 11:42 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.