VBA send mail with groupwise

  • Thread starter Thread starter flo
  • Start date Start date
F

flo

Hi.

I'd like to send an email with VBA from Excel 2002, using Groupwise 6.5.

I've tried these several code samples but nothing worked..

// Try 1
ActiveWorkbook.EnvelopeVisible = True
With ActiveSheet.MailEnvelope
.Introduction = "This is a sample worksheet."
.Item.To = "(e-mail address removed)"
.Item.Send
End With

// Try 2
Dim HLink As String
HLink = "mailto:" & Recipient & "(e-mail address removed)"
ActiveWorkbook.FollowHyperlink (HLink)

Any idea to solve this problem ?

Thanxs.
 
Here's a much better way (that will work in any of the
Office Apps):

1. In the VBA editor, choose TOOLS | REFERENCES and
choose GROUPWISE TYPE LIBRARY.

2. In your code write something like:

Dim gwMessage As GroupwareTypeLibrary.Message2
Dim gwaccount As GroupwareTypeLibrary.Account2
Dim gwapp As GroupwareTypeLibrary.Application
Dim gwattach As GroupwareTypeLibrary.Attachment
Dim rs As Variant

'Open a groupware session.
Set gwapp = CreateObject("NovellGroupWareSession")

'Login using the open acount
Set gwaccount = gwapp.Login()

'Create a new message in the mailbox.
Set gwMessage = gwaccount.MailBox.Messages.Add

gwMessage.BodyText = "Enter your message here."
gwMessage.Subject = "Enter the subject here."
gwMessage.Attachments.Add "Enter the path to any
attachments here"
'Address it externally.
gwMessage.Recipients.Add "(e-mail address removed)"
'Address it internally.
gwMessage.Recipients.Add "Joe Blow"

'Send the message
gwMessage.Send
 
Back
Top