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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook error: OLE error code 0x34767483: Unknown COM status code

Status
Not open for further replies.

RoadRunnerOz

Programmer
Aug 22, 2000
128
AU
A customer has been running an application for years now.

The program reads mail from 3 Outlook mailboxes, moves the mail to a "completed" folder and updates the database.

All was fine until they updated to Office 2000. Now the program gives them the above error after updating one record. They simply restart the program & continue until all mail is read, one at a time.

They are using Win2000, VFP6 Service Pack 5, Office 2000
(It was office 97)
Of course they answer yes when asked if they want to give Outlook control to another program. They select 5 or 10 minutes but it falls over long before that.

Any ideas? I believe it's a security setting MS added but I can't find where?

Thanks in advance..

Michael Ouellette
mouellette@tpg.com.au
 
Jolicoeur

Can you post the part of the code you think is causing the problem?

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
I'm using Nigel B Coates Outlookmail class
There's 500+ lines of code I'm sure you don't want to weed through but here's the form code that crashes:

The point is everything worked until the Office 2000 upgrade

Thanks

This is in the init of the form:

LPARAMETERS lcUserName, ; lcPassword, ; && Password (can be blank)
llUnreadOnly, ; && .T.=only load unread messages &&& doesn't work
lcSenderName, ; && Sender name to filter
lcSubject, ; && Subject to filter
lcMessageFromDate, ; && Message receipt start date to filter
lcMessageToDate && Message receipt end date to filter

SET CLASSLIB TO OutlookMail additive

public m.mailbox, m.whatbox
m.whatbox="Inbox"

*--- Nigel B Coates' Outlookmail.vcx classlib
THISFORM.oMail=CREATEOBJECT("cusMail")

This is in the click event of the button that crashes:
LOCAL moveloc
moveloc=0
Thisform.lastpoll.value=time()

Select mailboxes && table with inbox names
Go top
Scan for !empty(boxname)
* m.mailbox=alltr(mailboxes.boxname)

If ThisForm.Optionlive.value=2 && Users mailbox
* empty(m.mailboxl)
* home
m.mailbox=""
* added ID because all folders are named the same on the server.
m.entryid=""
Else
* m.mailbox=alltr(m.mailboxl)
* work
m.mailbox=alltr(mailboxes.boxname)
m.entryid=alltr(mailboxes.entryid)

Endif

Thisform.oMail.ReadMail("","",.T.,"","","","")

noadded=0
* alltr(mailboxes.boxsubject)

If !isnull(THISFORM.oMail.oInbox)
* I should count backwards in case new mail comes in...
* see move below...
* find "Completed" folder under this mailbox
For y=1 to THISFORM.oMail.oInbox.folders.count

If lower(THISFORM.oMail.oInbox.folders[y].name)="completed"
* set step on
moveloc=THISFORM.oMail.oInbox.folders[y]
Exit
Endif

Endfor

my=THISFORM.oMail.oInbox.Items.Count
For x=1 to my
* just get non read messages!
* nocount=
If !SEEK(THISFORM.oMail.oInbox.Items[(my+1)-x].entryid, "email" , 'ID') ;
and !empty(THISform.oMail.oInbox.Items[(my+1)-x].body) and iif( empty(m.mailbox),.T., inlist(alltr(THISform.oMail.oInbox.Items[(my+1)-x].subject),;
"General Enquiry Contact Request","Renault Expert Contact Request",;
"Renault Brochure Request","Servicing & Warranty Contact Request"))

Wait window "Adding new record.. "+ alltr(str(x)) nowait
noadded=noadded+1

Insert INTO email (subject, sender, messagetxt,ReceivedTime,timesent,id,new, autoadded);
values( THISform.oMail.oInbox.Items[(my+1)-x].subject ,THISform.oMail.oInbox.Items[(my+1)-x].SenderName, ;
THISform.oMail.oInbox.Items[(my+1)-x].body,THISFORM.oMail.oInbox.Items[(my+1)-x].ReceivedTime,;
THISFORM.oMail.oInbox.Items[(my+1)-x].senton, THISFORM.oMail.oInbox.Items[(my+1)-x].entryid,.T., datetime() )
Thisform.oMail.oInbox.Items[(my+1)-x].unread=.F.
* can't move while reading cause the number of items changes!!!
Thisform.oMail.oInbox.Items[(my+1)-x].move(moveloc)
Endif
Endfor
Endif !isnull

Wait window "Mailbox: "+m.mailbox+" added "+ alltr(str(noadded))+" Records at "+time() nowait

* moving records
If !isnull(THISFORM.oMail.oInbox) && added 12/06/01

mcnt=THISFORM.oMail.oInbox.Items.Count

*Set step on
* find "Completed" folder under this mailbox
For y=1 to THISFORM.oMail.oInbox.folders.count

If lower(THISFORM.oMail.oInbox.folders[y].name)="completed"
moveloc=THISFORM.oMail.oInbox.folders[y]
Exit
Endif

Endfor

For x=1 to mcnt

If THISFORM.oMail.oInbox.Items[(mcnt+1)-x].unread=.F.
* can't move while reading cause the number of items changes!!!
* count backwards
Thisform.oMail.oInbox.Items[(mcnt+1)-x].move(moveloc)
* THISFORM.oMail.oInbox.Items[(mcnt+1)-x].move(THISFORM.oMail.oInbox.folders[1]) && can't guarantee its 1
* THISFORM.oMail.oInbox.Items[(mcnt+1)-x].move("Completed")

Endif

Endfor
Endif !null

Endscan



Thisform.refresh()

Thisform.Command4.click() && process that updates email details




Michael Ouellette
mouellette@tpg.com.au
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top