|

- UID
- 70095
- 帖子
- 13
- 精华
- 0
- 积分
- 7
- 人气值
- 0 点
- 努力值
- 450 点
- 推广注册人数
- 0 个人
- 阅读权限
- 50
- 性别
- 男
- 在线时间
- 60 小时
- 注册时间
- 1970-1-1
- 最后登录
- 2005-1-24
|
3楼
发表于 2005-6-10 15:17
| 只看该作者
自己参考:
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Set uidoc=workspace.CurrentDocument
Dim vw As notesview
Set db = session.CurrentDatabase
Set view=db.getview("vwDefault")
Set doc = view.GetFirstDocument
Set excelapp = CreateObject("excel.application")
excelapp.Workbooks.Add
excelapp.Sheets("sheet1").Select
' For i=0 To 26
' excelapp.Columns(Chr(65+i)+":"+Chr(65+i)).ColumnWidth = 8
' excelapp.Columns(Chr(65+i)+":"+Chr(65+i)).WrapText = True
' excelapp.Columns(Chr(65+i)+":"+Chr(65+i)).Font.Size=9
' Next i
excelapp.Sheets("sheet1").Name = "人员资料汇总"
excelapp.Range("A1").Value = "人员Notes名称"
excelapp.Range("B1").Value = "人员名称"
row=1
While Not ( doc Is Nothing )
row=row+1
excelapp.Range("A"+Cstr(row)).Value =doc.Txtmailcode(0)
excelapp.Range("B"+Cstr(row)).Value =doc.NmEmpName(0)
Set doc = view.GetNextDocument( doc )
Wend
excelapp.Visible = True
Call uidoc.close |
|