Outlook compatibility again - please help!!!

gilberto

Registered User.
Local time
Today, 12:05
Joined
Apr 4, 2002
Messages
29
Dear all

I posted a thread 10 days ago, and despite a large number of views (many thanks for those who have analysed the problem) nobody has replied yet.

The problem (users using different versions of Outlook and sharing the database) is described in details there:
initial thread

I apologise for posting again the issue, but I really need help with it. Any suggestions are welcomed!

Thanks in advance,
Gilberto
 
Just a stab in the dark but you could try this.

Public Sub RemoveOutlook()
References.Remove References("Outlook")
End Sub

Public Sub AddOutlook()
References.AddFromFile (fnFindFile("C:\Program Files", "msout*.olb"))
End Sub

Public Function fnFindFile(strLookIn as string, strFiletoFind as string)

dim fs as object, i as integer
set fs = application.filesearch
with fs
.lookin = strlookin
.filename = strfiletofind
.searchsubfolders = true
.execute()
end with
end function

How you run this is up to you
Removal will be quick but Add will be slow.
You could trap for errors before removal and addition if you want.
 
Hi Fizzio

Many thanks for your suggestion, I think I understood.
I guess I have to run this when I open the main form (Papers)... am I right?

Thanks again,
Gilberto
 
Yep, as I said, there are a couple of options.

Refresh outlook everytime the Db is opened
Refresh only if an error is encountered - not sure what the error would be though - maybe someone could help with that one.

On the Form_Load event

call removeoutlook()
call addoutlook()

and this will remove and add outlook everytime the opening form is loaded - this will slow down opening of the Db though.

hth
 
Hi Fizzio

Thanks again.
The error occurs when the other user (not me) tries to include a new paper (I guess because it needs the function date()).
So your suggestion seems feasible - let me see if I'll be able to implement it given my (lack) of VB knowledge.

Regards,
Gilberto
 
Rather than running the code on your main form, create an autoexec macro
and add the code calls to that (and the call to open the main form) It will then only run once on opening.

There is code to screen for missing references but I have not had much joy in implementing it myself.
 
I'll try this way... not sure if I can implement it.
I'll let you know if I suceed.
Thanks again,
Cheers!
Gilberto
 

Users who are viewing this thread

Back
Top Bottom