MMQQ
07-03-2008, 08:15 PM
Hello,
There's at least 2 types of groupwise accounts, personal and resource (ie Finance-Dept). The resource being one generic account for a unit and department and usually multiple people have joint proxy. Access to this resource is through logging in the personal account and then through a proxy change.
I have found code that will automatically create a session in Groupwise and send e-mails out to a group of people. The same code doesn't work with the resource. The macro doesn't recognize it as being the same as a personal account.
Is it possible at all to send e-mails through this resource and how should the code change? Copied this out from another thread.
'SECTION 1
'Declare all required variables
Const NGW$ = "NGW"
Dim ogwNewMessage As GroupwareTypeLibrary.Mail Dim StrLoginName As String, _
StrMailPassword As String, _
StrSubject As String, _
StrBody As String, _
strAttachFullPathName As String, _
sCommandOptions As String, _
cl As Range
'SECTION 2
'Set all required variables
StrLoginName = "GroupwiseMailboxName" 'Enter your mailbox ID here
StrMailPassword = "" 'A true password is not required
StrSubject = "Subject goes here"
StrBody = "Body of message goes here" & vbCrLf & _
"Sent at " & Now()
strAttachFullPathName = "" 'Put full path of workbook to be attached between quotes.
'SECTION 3
'Create the Groupwise object and login in to Groupwise
'Set application object reference if needed
If ogwApp Is Nothing Then 'Need to set object reference
DoEvents
Set ogwApp = CreateObject("NovellGroupWareSession")
DoEvents
End If
If ogwRootAcct Is Nothing Then 'Need to log in
'Login to root account
If Len(StrMailPassword) Then 'Password was passed, so use it
sCommandOptions = "/pwd=" & StrMailPassword
Else 'Password was not passed
sCommandOptions = vbNullString
End If
Set ogwRootAcct = ogwApp.Login(StrLoginName, sCommandOptions, _
, egwPromptIfNeeded)
DoEvents
End If
....
Any help is appreciated.
Thanks,
MM
There's at least 2 types of groupwise accounts, personal and resource (ie Finance-Dept). The resource being one generic account for a unit and department and usually multiple people have joint proxy. Access to this resource is through logging in the personal account and then through a proxy change.
I have found code that will automatically create a session in Groupwise and send e-mails out to a group of people. The same code doesn't work with the resource. The macro doesn't recognize it as being the same as a personal account.
Is it possible at all to send e-mails through this resource and how should the code change? Copied this out from another thread.
'SECTION 1
'Declare all required variables
Const NGW$ = "NGW"
Dim ogwNewMessage As GroupwareTypeLibrary.Mail Dim StrLoginName As String, _
StrMailPassword As String, _
StrSubject As String, _
StrBody As String, _
strAttachFullPathName As String, _
sCommandOptions As String, _
cl As Range
'SECTION 2
'Set all required variables
StrLoginName = "GroupwiseMailboxName" 'Enter your mailbox ID here
StrMailPassword = "" 'A true password is not required
StrSubject = "Subject goes here"
StrBody = "Body of message goes here" & vbCrLf & _
"Sent at " & Now()
strAttachFullPathName = "" 'Put full path of workbook to be attached between quotes.
'SECTION 3
'Create the Groupwise object and login in to Groupwise
'Set application object reference if needed
If ogwApp Is Nothing Then 'Need to set object reference
DoEvents
Set ogwApp = CreateObject("NovellGroupWareSession")
DoEvents
End If
If ogwRootAcct Is Nothing Then 'Need to log in
'Login to root account
If Len(StrMailPassword) Then 'Password was passed, so use it
sCommandOptions = "/pwd=" & StrMailPassword
Else 'Password was not passed
sCommandOptions = vbNullString
End If
Set ogwRootAcct = ogwApp.Login(StrLoginName, sCommandOptions, _
, egwPromptIfNeeded)
DoEvents
End If
....
Any help is appreciated.
Thanks,
MM