Does anyone out there use OLE to interface with Maximizer?
I have a very simple piece of VB code that hangs off a maximzer toolbar button. It returns me the current company information no problem. I then want to loop through all contacts for that company and I can't find the commands to access them
Any help gratefully appreciated. Skeleton Code follows.
I'm also going to post this in the VB forum on the off chance.......
Private Sub Command2_Click()
Dim objMaxAttach As New MaximizerTLB.AttachToCurrentInstance ' Define CurrentInstance object of running Maximizer
Dim objMaxCur As MaximizerTLB.CurrentRecord ' Define Current Record Object variable
Dim objMaxApp As MaximizerTLB.Application
Set objMaxApp = objMaxAttach.GetApplicationObject
Set objMaxCur = objMaxAttach.GetCurrentRecordObject ' client or contact
With objMaxCur
sresult = .GetFieldValue("City")
Text1.Text = sresult
' check fields required
myRecType = .GetFieldValue("rectype")
'1=companmy, 31=contact, 2=indivisual
Select Case myRecType
Case Is = 31
Case Is = 1
objMaxApp.ActivateWindow ("Contact")
' get contacts here and loop through
' Call objMaxCur.ScrollList("top")
' Call objMaxCur.ScrollList("linedown")
Case Is = 2
End Select
End With
Set objMaxCur = Nothing ' Release object
Set objMaxAttach = Nothing ' Release Object
End Sub
I have a very simple piece of VB code that hangs off a maximzer toolbar button. It returns me the current company information no problem. I then want to loop through all contacts for that company and I can't find the commands to access them
Any help gratefully appreciated. Skeleton Code follows.
I'm also going to post this in the VB forum on the off chance.......
Private Sub Command2_Click()
Dim objMaxAttach As New MaximizerTLB.AttachToCurrentInstance ' Define CurrentInstance object of running Maximizer
Dim objMaxCur As MaximizerTLB.CurrentRecord ' Define Current Record Object variable
Dim objMaxApp As MaximizerTLB.Application
Set objMaxApp = objMaxAttach.GetApplicationObject
Set objMaxCur = objMaxAttach.GetCurrentRecordObject ' client or contact
With objMaxCur
sresult = .GetFieldValue("City")
Text1.Text = sresult
' check fields required
myRecType = .GetFieldValue("rectype")
'1=companmy, 31=contact, 2=indivisual
Select Case myRecType
Case Is = 31
Case Is = 1
objMaxApp.ActivateWindow ("Contact")
' get contacts here and loop through
' Call objMaxCur.ScrollList("top")
' Call objMaxCur.ScrollList("linedown")
Case Is = 2
End Select
End With
Set objMaxCur = Nothing ' Release object
Set objMaxAttach = Nothing ' Release Object
End Sub