Log in

View Full Version : Help: Autoemail problem - Groupwise 6.5 to 7.0



DavvyBoy
10-24-2005, 10:17 AM
Our site just upgraded to Groupwise 7.0 from 6.5.
The following code use to work in Access 2000 and now I can't compile the modules etc:

Sub EmailUser(strUser2 As String, SITE As String, OffSite As Boolean)
On Error GoTo Err_EmailUser
'Code to Automatic E-mail (Passed the Send to and Site variables)
Dim objGW As New GroupwareTypeLibrary.Application
' Stop
Dim dgGW As Object
Dim dgGWMsg As Object
Dim dgRecip As Object
Dim dgAddrs As String
Dim eBody As String
Dim AttachFile As String, AttachFileName As String, MyTableAttach As Recordset, MyDBAttach As Database
Dim SqlStrAttach As String, strUserAttach As String

eBody = ""
' Create the GroupWise login session.

Set dgGW = objGW.login.AllFolders.ItemByName("Work In Progress").Messages.Add("GW.Message.Mail", egwDraft)

' Create the message.
' Set the Subject, Body, From of the message.

dgGW.Subject = "Your Monthly Financial Reports - Ready."
eBody = "This Message is to inform you that your new Monthly Reports have been " & Chr(10) & Chr(10)

etc..

When I compile the following error message appears:
"Compile Error: Method or data member not found"
Highlighted on the
Set dgGW = objGW.login.Allfolders.ItemByName....

It appears the Groupware Type Library has been changed... Does anyone no the correct syntax..

Thanking you in Advance.

chocobochick
10-25-2005, 09:44 AM
If the syntax has truly changed, you may need to contact the developer for proper documentation.

One possibility, although it's a long shot, is that the upgrade might have scrambled the way Visual Basic references the type library. You could use the Tools/References command in the VB editor to see if it still thinks it's referencing a 6.5 version library. If the upgrade rewrote the DLL, you may need to remove the reference and add it again. Unfortunately, that's the best guess I have to offer.