Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VBA send mail with groupwise

179 views
Skip to first unread message

flo

unread,
Dec 11, 2003, 9:18:49 AM12/11/03
to
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 = "adr...@url.com"
.Item.Send
End With

// Try 2
Dim HLink As String
HLink = "mailto:" & Recipient & "adr...@url.com"
ActiveWorkbook.FollowHyperlink (HLink)

Any idea to solve this problem ?

Thanxs.

Bob T.

unread,
Dec 11, 2003, 10:10:33 AM12/11/03
to
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 "who...@wherever.com"
'Address it internally.
gwMessage.Recipients.Add "Joe Blow"

'Send the message
gwMessage.Send

>.
>

0 new messages