Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #7044
| From | "Jamal" <someone@example.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: OLEAutoObject with Outlook 32-bit under Win7 64-bit |
| Date | 2014-07-11 07:00 -0400 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <lpog54$8jo$1@speranza.aioe.org> (permalink) |
| References | <9b4ab259-1b9c-4a32-a1ef-3b371bdf861f@googlegroups.com> |
Glenn,
I have sites using my app with a mixed environment like yours with no
problem.
BTW, change
LOCAL oOutlook AS USUAL
to
LOCAL oOutlook AS OBJECT
Note sure if above will make a difference.
Your options:
1. You may want to create another Windows user as an administrator and try
your code again.
2. Try to disable an anti-virus software temporarily which might be blocking
scripting of OLE objects to see if that could be a reason.
Jamal
"Glenn Keeler" wrote in message
news:9b4ab259-1b9c-4a32-a1ef-3b371bdf861f@googlegroups.com...
I have been running stuck on getting a particular OLEAutoObject process to
function in the mixed environment where my app and Outlook are 32 bit, but
the OS is 64-bit.
This works perfectly under Win7 32-bit, but when under Win7 64-bit produces
no visible results not even the various error messages you see in the code.
It is as if this function is hanging at the OLEAutoObject call.
My only hunch is that perhaps this has to do with Registry access of 32-bit
programs, but that hunch does not get me very far in fixing this. I am
pasting the very standard code below. Any suggestions are welcome although
note that a) direct SMTP is not an option as security policies prevent that
at my client sites and b) MAPI calls in this environment result in windows
error messages and are modal which is not desirable.
Thanks.
//--------------------------------
FUNCTION SendMailOutlook(aEmail AS ARRAY, aCC AS ARRAY, aBCC AS ARRAY,
aFiles AS ARRAY, cSubject AS STRING, cText AS STRING) AS LOGIC
LOCAL oOutlook AS USUAL
LOCAL oMail AS USUAL
LOCAL oAttachment AS USUAL
LOCAL nCount AS DWORD
LOCAL lContinue AS LOGIC
LOCAL oRecipient AS USUAL
lContinue := TRUE
// Init outlook object
oOutlook := OLEAutoObject{"Outlook.Application"}
IF !oOutlook:fInit
lContinue := FALSE
ErrorBox{,"Failed to initiate Outlook remote server"}:show()
END
IF lContinue
oMail:=oOutlook:CreateItem(0)
IF oMail = NULL_OBJECT
ErrorBox{,"Failed to create mail object"}:show()
lContinue := FALSE
END
END
// OK
IF lContinue
// To
FOR nCount:=1 UPTO ALen(aEmail)
oRecipient := oMail:Recipients:Add(AllTrim(aEmail[nCount]))
oRecipient:Type := 1 // TO=1
NEXT
// CC
FOR nCount := 1 UPTO ALen(aCC)
oRecipient := oMail:Recipients:Add(AllTrim(aCC[nCount]))
oRecipient:Type := 2 // CC=2
NEXT
// BCC
FOR nCount := 1 UPTO ALen(aBCC)
oRecipient := oMail:Recipients:Add(AllTrim(aBCC[nCount]))
oRecipient:Type := 3 // BCC=3
NEXT
// Check addresses
IF oMail:Recipients:ResolveAll()
// Set subject
oMail:Subject := cSubject
IF "<HTML" $ Upper(cText)
oMail:HTMLBody := cText
ELSE
oMail:Body := cText
END
// Attach a file
oAttachment := oMail:Attachments
FOR nCount := 1 UPTO ALen(aFiles)
oAttachment:Add(aFiles[nCount])
NEXT
oMail:Display()
ELSE
lContinue := FALSE
ErrorBox{,"Error resolving email addresses"}:show()
ENDIF
ELSE
ErrorBox{,"Error sending Outlook mail"}:show()
ENDIF
RETURN lContinue
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
OLEAutoObject with Outlook 32-bit under Win7 64-bit Glenn Keeler <glennkeeler@shaw.ca> - 2014-07-10 07:58 -0700
Re: OLEAutoObject with Outlook 32-bit under Win7 64-bit "Gerhard Bunzel" <g.bunzel@domonet.de> - 2014-07-11 11:07 +0200
Re: OLEAutoObject with Outlook 32-bit under Win7 64-bit Glenn Keeler <glennkeeler@shaw.ca> - 2014-07-11 10:24 -0700
Re: OLEAutoObject with Outlook 32-bit under Win7 64-bit "Jamal" <someone@example.com> - 2014-07-11 07:00 -0400
Re: OLEAutoObject with Outlook 32-bit under Win7 64-bit Glenn Keeler <glennkeeler@shaw.ca> - 2014-07-11 14:20 -0700
csiph-web