Advertisement
Advertisement
| 09.11.2008 at 07:52AM PDT, ID: 23723149 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: |
Sub Click(Source As Button)
Dim session As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim db As NotesDatabase
Dim view As NotesView
Dim Mgrdc As NotesDocumentcollection
Dim MgrDoc As notesDocument
Dim Repdc As NotesDocumentCollection
Dim RepDoc As NotesDocument
Dim mgrview As NotesView
Dim RepView As NotesView
Dim txt_Agency As String
Dim tmp_NotesName As NotesName
Dim MgrKey, RepKey, ADKey As String
Dim xlApp As Variant
Dim xlSheet As Variant
Dim i As Integer
Dim x As Integer
Set db = session.CurrentDatabase
Set Mgrdc = db.UnprocessedDocuments
Set Mgrdoc = Mgrdc.GetFirstDocument
On Error Resume Next
RepKey = MgrDoc.ussales(0)
Set Repview = db.GetView( "(user_export_selected)")
Set RepDoc = Repview.GetDocumentByKey( RepKey ) ' form name must be first colum and sorted
Print "Creating Excel Workbook..."
Set xlApp = CreateObject("Excel.application")
Print "Creating Excel Worksheet for Survey Results."
xlApp.Workbooks.Add
Set xlSheet = xlApp.Workbooks(1).Worksheets(1)
XlApp.Columns("A").Select
With XlApp.Selection
.ColumnWidth=5
.WrapText=1
.HorizontalAlignment = xlCenter
End With
XlApp.Columns("F:J").Select
With XlApp.Selection
.ColumnWidth=5
.WrapText=1
.HorizontalAlignment = xlCenter
End With
xlSheet.Cells(1,1).Value = "Server"
xlSheet.Cells(1,2).Value = "Office"
xlSheet.Cells(1,3).Value = "Detached"
xlSheet.Cells(1,4).Value = "Last Name"
xlSheet.Cells(1,5).Value = "First Name"
xlSheet.Cells(1,6).Value = "DAI"
xlSheet.Cells(1,7).Value = "Emp #"
xlSheet.Cells(1,8).Value = "Cost Center"
xlSheet.Cells(1,9).Value = "Current Type"
xlSheet.Cells(1,10).Value = "Refresh Date"
xlSheet.Cells(1,11).Value = "Current Asset"
xlSheet.Cells(1,12).Value = "Current Svc"
xlSheet.Cells(1,13).Value = "Refreshing?"
xlSheet.Cells(1,14).Value = "Order Type"
xlSheet.Cells(1,15).Value = "Device Type"
xlSheet.Cells(1,16).Value = "Accessories"
xlSheet.Cells(1,17).Value = "CDS"
xlSheet.Cells(1,18).Value = "VPN"
xlSheet.Cells(1,19).Value = "SS"
xlSheet.Cells(1,20).Value = "email"
xlSheet.Cells(1,21).Value = "LAN PW"
xlSheet.Cells(1,22).Value = "Notes PW"
xlSheet.Cells(1,23).Value = "Shr/Ded"
xlSheet.Cells(1,24).Value = "New Asset"
xlSheet.Cells(1,25).Value = "New Svc"
xlSheet.Cells(1,26).Value = "New Mon Asset"
xlSheet.Cells(1,27).Value = "New Mon Svc"
xlSheet.Cells(1,28).Value = "Comments"
x = 3
While Not ( RepDoc Is Nothing ) ' as long as it has a handle on a document do the following
If RepDoc.ussales(0) = RepKey Then
xlSheet.Rows("1:1").Select
xlSheet.Rows(1).WrapText =True
xlsheet.Columns(1).Columnwidth = 10
xlsheet.Columns(2).Columnwidth = 8
xlsheet.Columns(3).Columnwidth = 8
xlsheet.Columns(4).Columnwidth = 15
xlsheet.Columns(5).Columnwidth = 15
xlsheet.Columns(6).Columnwidth = 15
xlsheet.Columns(7).Columnwidth = 15
xlsheet.Columns(8).Columnwidth = 15
xlsheet.Columns(9).Columnwidth = 15
xlsheet.Columns(10).Columnwidth = 15
xlsheet.Columns(11).Columnwidth = 15
xlsheet.Columns(12).Columnwidth = 15
xlsheet.Columns(13).Columnwidth = 15
xlsheet.Columns(14).Columnwidth = 15
xlsheet.Columns(15).Columnwidth = 15
xlsheet.Columns(16).Columnwidth = 15
xlsheet.Columns(17).Columnwidth = 15
xlsheet.Columns(18).Columnwidth = 15
xlsheet.Columns(19).Columnwidth = 15
xlsheet.Columns(20).Columnwidth = 15
xlsheet.Columns(21).Columnwidth = 15
xlsheet.Columns(22).Columnwidth = 15
xlsheet.Columns(23).Columnwidth = 15
xlsheet.Columns(24).Columnwidth = 15
xlsheet.Columns(25).Columnwidth = 15
xlsheet.Columns(26).Columnwidth = 15
xlsheet.Columns(27).Columnwidth = 15
xlsheet.Columns(28).Columnwidth = 35
xlSheet.Cells(x,1).Value = RepDoc.ussales
xlSheet.Cells(x,2).Value = RepDoc.office_number
xlSheet.Cells(x,3).Value = RepDoc.detached
xlSheet.Cells(x,4).Value = RepDoc.lname
xlSheet.Cells(x,5).Value = RepDoc.fname
xlSheet.Cells(x,6).Value = RepDoc.dai
xlSheet.Cells(x,7).Value = RepDoc.emp_num
xlSheet.Cells(x,8).Value = RepDoc.ccc
xlSheet.Cells(x,9).Value = RepDoc.current_device_type
xlSheet.Cells(x,10).Value = RepDoc.refresh_date
xlSheet.Cells(x,11).Value = RepDoc.current_asset
xlSheet.Cells(x,12).Value = RepDoc.current_svc_tag
xlSheet.Cells(x,13).Value = RepDoc.refresh_device
xlSheet.Cells(x,14).Value = RepDoc.dlm_vap
xlSheet.Cells(x,15).Value = RepDoc.device
xlSheet.Cells(x,16).Value = RepDoc.accessories
xlSheet.Cells(x,17).Value = RepDoc.cds_user
xlSheet.Cells(x,18).Value = RepDoc.vpn_user
xlSheet.Cells(x,19).Value = RepDoc.first_six_ssn
xlSheet.Cells(x,20).Value = RepDoc.user_email
xlSheet.Cells(x,21).Value = RepDoc.lan_pw
xlSheet.Cells(x,22).Value = RepDoc.notes_pw
xlSheet.Cells(x,23).Value = RepDoc.share_ded
xlSheet.Cells(x,24).Value = RepDoc.new_asset
xlSheet.Cells(x,25).Value = RepDoc.new_svc_tag
xlSheet.Cells(x,26).Value = RepDoc.new_mon_asset
xlSheet.Cells(x,27).Value = RepDoc.new_mon_svc_tag
xlSheet.Cells(x,28).Value = RepDoc.comments
RecNum = x - 3 ' optional
Print "Gathering Data. Record Number: " + RecNum ' optional
x = x + 1 ' increments x by one
Else ' these tell it to get the next document in the view which loops back to
Set RepDoc = Repview.GetLastDocument ' While not (RepDoc) is nothing
End If
Set RepDoc = Repview.GetNextDocument(RepDoc)
Wend
Print "Data Collection Complete."
Set xlSheet = xlApp.Workbooks(1).Worksheets("Sheet1")
Set range1 = xlsheet.Range("A2: IV300")
Call range1.Sort(xlsheet.Columns("N"), , , , , , , 1)
Msgbox "Your Refresh Export is ready in Excel. Click OK and then open the Excel file flashing near the bottom of your screen. ", 64, "Excel Export"
xlApp.Visible = True
xlApp.UserControl = True
End Sub
|