Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 49948

Open up a Lotus Notes Database (not mail) create a new post and attach files VBA Excel

$
0
0
Hi All,

I'm using Excel to open up a Lotus notes DB and then create a new topic and then attach a bunch of Excel files stored in a folder - I've tried many lines of code but it won't work.


Code:

Private Sub Command1_Click()
Dim session As Object
Dim db As Object
Dim doc As Object
Set session = CreateObject("Notes.NotesSession")
Set db = session.GetDatabase("", "MYLNDB.nsf")
Set doc = db.CreateDocument()
doc.Form = "Main Topic"
doc.Subject = "yo"
doc.Body = "hey"
Call doc.Save(True, False)
End Sub

I have some code which opens up the database and creates a new post but need some code for it to attach to a DB

Can you please help?

Thanks

Viewing all articles
Browse latest Browse all 49948

Trending Articles