Controlling Outlook 2000 Spellchecker with a VBA Macro

G

Guest

I have a VBA macro thats creats an outlook button that enables a user to
forward a viewed e-mail to a predfined e-mail address ( email is selected,
forward button pressed, then send button pressed..3 steps). When the check
spelling before sending option is active the speller begins... I would like
to in the VBA macro;
check if spell checker is on,
if on, turn off and
forward email,
turn spell checker back on,
then end,
else
if spell checker is off,
forward email,
then end.

any ideas
here is the code

'This code opens a Forward message window, need to click
Function GetCurrentItem() As Object
Dim objApp As Outlook.Application

Set objApp = CreateObject("Outlook.Application")
On Error Resume Next
Select Case TypeName(objApp.ActiveWindow)
Case "Explorer"
Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
Case "Inspector"
Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
Case Else
' anything else will result in an error, which is
' why we have the error handler above
End Select

Set objApp = Nothing
End Function
Sub FwdToNonUSDA()
Dim myOlApp As New Outlook.Application
Dim myItem, myForward As Object
Set myItem = GetCurrentItem()
Set myForward = myItem.Forward
myForward.To = "notmymail@xyz,com"
myForward.Display
Set myItem = Nothing
Set myForward = Nothing
 
M

Michael Bauer

Hi,

you can find the settings in the registry, for OL 2000 under:
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Outlook\Options\Spelling

You can try to set and reset the values but probably OL reads them only
once at starting. If so then, I think, there is no way.
 

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