Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

Sign in to participate PreviousPrevious NextNext


Frank A. Fischer 25.Sep.07 05:43 AM a Web browser
Notes Client 6.5.4 Windows XP


Dear Cracks,

I have a great problem sending mails via VBA in Excel.
I use this code on 30 computers without any problems. Only my computer doesn't work since last week and I could not detect any changes and also know any changes I did.
My .xls is working on other computers, other .xls (always the same code and workbook) doesn't work on my computer...

On Line Set >>MailDoc = Maildb.CREATEDOCUMENT<< the error will be active. I guess the command >>Set session = CreateObject("Notes.NotesSession")<< faild

Where is the problem?
How can I detect in VBA that the SET-command well done?

I work on a client at Adam Opel GmbH in Germany, all hotfixes where done.
I hope you understand my awful english...

---------------------------------
Public Sub SendNotesMail(Subject, Recipient, BodyText, Attachment) '(Subject As String, Attachment As String, Recipient As String, BodyText As String, SaveIt As Boolean) 'Set up the objects required for Automation into lotus notes

'On Error GoTo Fehler

Dim Maildb As Object 'The mail database
Dim UserName As String 'The current users notes name
Dim MailDbName As String 'THe current users notes mail database name
Dim MailDoc As Object 'The mail document itself
Dim AttachME As Object 'The attachment richtextfile object
Dim session As Variant 'The notes session
Dim EmbedObj As Object 'The embedded object (Attachment)

Set session = CreateObject("Notes.NotesSession") 'Start a session to notes

UserName = session.UserName
MailDbName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"
Set Maildb = session.getdatabase("", MailDbName) 'Open the mail database in notes

If Maildb.ISOPEN = True Then
'Already open for mail
Else
Maildb.OPENMAIL
End If

'Set up the new mail document
Set MailDoc = Maildb.CREATEDOCUMENT
MailDoc.Form = "Memo"
MailDoc.sendto = Recipient
MailDoc.Subject = Subject
MailDoc.Body = BodyText
MailDoc.SAVEMESSAGEONSEND = True

If Attachment <> "" Then 'Set up the embedded object and attachment and attach it
Set AttachME = MailDoc.CREATERICHTEXTITEM(Attachment)
Set EmbedObj = AttachME.EMBEDOBJECT(1454, "", Attachment, "Attachment")
MailDoc.CREATERICHTEXTITEM ("attachment")
End If

'Send the document
MailDoc.PostedDate = Now() 'Gets the mail to appear in the sent items folder
MailDoc.SEND 0, Recipient

'Clean Up
MsgBox "Die Mail wurde an " & Recipient & " versendet!", vbInformation, "Mailversand"
Unload UF_MailVersenden

Set Maildb = Nothing
Set MailDoc = Nothing
Set AttachME = Nothing
Set session = Nothing
Set EmbedObj = Nothing
Exit Sub

Fehler:
Text = "Mail versenden. Empfänger: " & Recipient
Call ErrorHandler(Text)
End Sub






Error 7063, Database has not been o... (Frank A. Fische... 25.Sep.07)
. . RE: Error 7063, Database has not be... (Rachhpal Jassal... 25.Sep.07)
. . . . RE: Error 7063, Database has not be... (Frank A. Fische... 25.Sep.07)
. . RE: Error 7063, Database has not be... (Ian R Jones 25.Sep.07)
. . . . RE: Error 7063, Database has not be... (Frank A. Fische... 25.Sep.07)
. . . . . . Maybe an oddity with Notes installa... (Ian R Jones 25.Sep.07)
. . . . . . . . RE: Maybe an oddity with Notes inst... (Frank A. Fische... 25.Sep.07)
. . RE: Error 7063, Database has not be... (Emmanuel BANIDE... 20.Jun.12)
. . RE: Error 7063, Database has not be... (Victor Mirica 27.Feb.13)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

 Sign In or Register
Sign in
Forgot your password?
Forgot your user name?
Create new registration

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite