Hi All..... Can any one help. I have the below code to export an email from Notes only it doesnt work as far as I can see It connects ok to my notes DB then bombs out on the line:0-
'Set MSDSView = ConMSDS.GETVIEW("view name"
but I get Run Time error 91. Object variable or With Block Vairable not Set does any one know the correct views I can try in order to crack this problem
Private Sub Integrate_LOTUS()
'Declaring variables
Dim Session As Object
Dim ConMSDS As Variant
Dim ConView As Variant
Dim MSDSView As Variant
Dim MSDSDoc As Variant
Dim Doc As Variant
Dim MSDSItem As Variant
Dim CopyItem As Variant
Dim s As Object, db As Object ', Doc As Object
Set s = CreateObject("Notes.Notessession" 'create notes session
Set ConMSDS = s.GETDATABASE("", "" 'set db to database not yet named
Call ConMSDS.openmail
'all of the above opens the connection to notes.
'this stuff below sets the view of what to open this is what I cant work out _
'Set MSDSView = ConMSDS.GETVIEW("view name" - this line is where im goosed I dont _
know what the view is called
If ConMSDS.ISOPEN = True Then
Set MSDSView = ConMSDS.GETVIEW(""
Set MSDSDoc = MSDSView.GETFIRSTDOCUMENT()
Set MSDSItem = MSDSDoc.CREATERICHTEXTITEM(MSDSView.Name)
CopyItem = MSDSItem.COPYITEMTODOCUMENT("c:\tom.rtf", "dont-know-what-to-put-here"
MsgBox (MSDSItem.Name)
End If
End Sub
Cheers
Chris
'Set MSDSView = ConMSDS.GETVIEW("view name"
but I get Run Time error 91. Object variable or With Block Vairable not Set does any one know the correct views I can try in order to crack this problem
Private Sub Integrate_LOTUS()
'Declaring variables
Dim Session As Object
Dim ConMSDS As Variant
Dim ConView As Variant
Dim MSDSView As Variant
Dim MSDSDoc As Variant
Dim Doc As Variant
Dim MSDSItem As Variant
Dim CopyItem As Variant
Dim s As Object, db As Object ', Doc As Object
Set s = CreateObject("Notes.Notessession" 'create notes session
Set ConMSDS = s.GETDATABASE("", "" 'set db to database not yet named
Call ConMSDS.openmail
'all of the above opens the connection to notes.
'this stuff below sets the view of what to open this is what I cant work out _
'Set MSDSView = ConMSDS.GETVIEW("view name" - this line is where im goosed I dont _
know what the view is called
If ConMSDS.ISOPEN = True Then
Set MSDSView = ConMSDS.GETVIEW(""
Set MSDSDoc = MSDSView.GETFIRSTDOCUMENT()
Set MSDSItem = MSDSDoc.CREATERICHTEXTITEM(MSDSView.Name)
CopyItem = MSDSItem.COPYITEMTODOCUMENT("c:\tom.rtf", "dont-know-what-to-put-here"
MsgBox (MSDSItem.Name)
End If
End Sub
Cheers
Chris