I have written the code like this but I got error in save methoderror is “Instance member does not exist”
pls guide me that how to solve the problem
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim ss As New NotesSession
Dim db As NotesDatabase
Dim vw As NotesView
Dim doc As NotesDocument
Dim item As NotesItem
Dim filepath As String, pathname As String
Dim filenum As Integer
Dim x As Variant, y As Variant
On Error Goto Errorhandle
Set uidoc=ws.CurrentDocument
Set db=ss.CurrentDatabase
Set vw=db.GetView("Configuration")
Set doc=vw.GetFirstDocument()
Set item= doc.GetFirstItem("ExcelfileName")
filepath$=item.Text
filenum=Freefile()
’ Open Excel Application
If Len(Dir(filepath$))>0 Then Kill filepath$
Open filepath$ For Output As filenum
Set z=createobject("Excel.Application")
Set y=z.Workbooks.add
z.visible=True
z.caption="Exporting From Notes Current Document to Excel"
z.worksheets(1).Name="Customer Info"
z.worksheets(1).Range("A1").value="Customer Details"
z.worksheets(1).Range("A3").value=" Name"
z.worksheets(1).Range("B3").value="Email"
z.worksheets(1).Range("C3").value="Phone"
z.worksheets(1).Range("D3").value="City"
z.worksheets(1).Range("E3").value="Address"
’ Export Data from Notes Document
i=2
Set x=z.workbooks(1).worksheets(1)
If Not uidoc Is Nothing Then
Gosub Export
End If
If uidoc Is Nothing Then
Gosub Terminate
End If
’ Export Values from Out Door View
Export :
s="A"+Cstr(3+i)+":C"+Cstr(3+i)
x.cells(i+3,1).value=Cstr(uidoc.FieldGetText("CuName")) ' Item
x.cells(i+3,2).value=Cstr(uidoc.FieldGetText("CuEmail")) ' Item
x.cells(i+3,3).value=Cstr(uidoc.FieldGetText("CuPhone")) ' Item
x.cells(i+3,4).value=Cstr(uidoc.FieldGetText("CuCity")) 'item
x.cells(i+3,5).value=Cstr(uidoc.FieldGetText("CuAddress"))'Item
'Set x=Nothing
z.SaveAs(filepath$) 'I got the error here
z.Quit
Set z=Nothing
Close filenum
Terminate :
Exit Sub
Errorhandle:
Messagebox "Error:" & Error & " at line " & Cstr(Erl)
End Sub
thanks®ards