Lotus Domino script snippet Export Notes Database Design to XML
Script to export all design elements the Notes database has to XML. This script is used in our NDDM solution.
Specify Database Server (field DbServer) and Filepath (field DbFilePath)
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 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 |
Public Sub GETDESIGN_start 'Initiated by button/action on main form/view Dim sn As New NotesSession Dim dbCur As NotesDatabase Dim db As NotesDatabase Dim docInfocol As NotesDocumentCollection Dim docInfo As NotesDocument Dim strBaseFolder As String Dim strOutputDir As String Dim ws As New NotesUIWorkspace Dim uidoc As NotesUIDocument On Error GoTo ErrorHandler On Error 4060 GoTo NoDbAccess 'lsERR_NOTES_DBNOACCESS Set uidoc = ws.CurrentDocument If Not uidoc Is Nothing Then 'Process only current document - frontend. Set docInfo = uidoc.Document 'TO DO: Edit document and upload all files, don't think this will work... Else 'Document Collection Set dbCur = sn.CurrentDatabase Set docInfoCol = dbCur.Unprocesseddocuments If docInfoCol.Count > 0 Then strBaseFolder = selectFolder("Select folder:", strBaseFolder) If strBaseFolder <> "" Then Set docInfo = docInfoCol.Getfirstdocument() While Not docInfo Is Nothing Set db = sn.GetDatabase(docInfo.GetItemValue("DbServer")(0), docInfo.GetItemValue("DbFilePath")(0)) 'Results in error 4060 if No Access --> db Is Nothing If Not db Is Nothing Then If db.IsOpen Then Print db.Title & ": Converting database design to xml..." strOutputDir = strBaseFolder + "\" + CStr(db.Replicaid) winCreateFolder strOutputDir Call GETDESIGN_getDesignElementsSelected(db, docInfo, strOutputDir) Call docInfo.Save(True, False) Print db.Title & ": Design conversion to xml completed." Else Print "database " & docInfo.GetItemValue("DbServer")(0) & "!!" & docInfo.GetItemValue("DbFilePath")(0) & " does not exist" End If Else Print "No access to database " & docInfo.GetItemValue("DbServer")(0) & "!!" & docInfo.GetItemValue("DbFilePath")(0) End If Set docInfo = docInfoCol.Getnextdocument(docInfo) Wend End If End If End If Exit Sub NoDbAccess: 'Error 4060 Resume Next Exit Sub ErrorHandler: Print "GETDESIGN_start - Error: " & CStr(Err) & " at line: " & CStr(Erl) & "; " & Error$ Exit Sub End Sub Function FUNCTIONS_replaceAll(ByVal psIn As String, ByVal psSearch As String, ByVal psReplace As String) As String Dim lsRV As String Dim liPos As Long Dim liLastPos As Long liLastPos = 0 liPos = InStr(psIn,psSearch) Do While liPos > 0 lsRV = lsRV + Mid$(psIn, liLastPos + 1, liPos - liLastPos - 1) + psReplace liLastPos = liPos liPos = InStr(liLastPos + 1, psIn, psSearch) Loop lsRV = lsRV + Mid$(psIn, liLastPos + 1) FUNCTIONS_replaceAll = lsRV End Function Sub GETDESIGN_search(db As NotesDatabase, docInfo As NotesDocument, varSearchKeywords, varSearchResult) 'here are some fields witch carrying the scripting text according to the design document Const fnScriptLib = "$ScriptLib" Const fnDBScript = "$DBScript" Const fnFormGlobalScript = "$Script" Const fnFormScript = "$$FormScript" Const fnViewGlobalScript = "$ViewGlobalScript" Const fnViewScript = "$ViewScript" Const fnAgentGlobalScript = "$AgentGlobalScript" Const fnAgentScript = "$AgentScript" Dim sn As New NotesSession 'Dim DocTypes(26) Dim DocTypes(8) Dim DesignDocs() As NotesDocument Dim fns As Variant Dim ErrMsg As String Dim x As Long Dim updated As Boolean Dim strFileName As String Dim strFileNameTmp As String Dim stream As NotesStream Dim exporter As NotesDXLExporter Dim varFileName Dim i As Integer Dim j As Integer Dim k As Integer Dim m As Integer Dim iResultLen As Integer Dim strOutputDir As String Dim strChars As String Dim varChars Dim strResult As String Dim strSplitter As String Dim blDXLError As Boolean strSplitter = " -> " On Error GoTo ErrorHandler strOutputDir = Environ$("Temp") j = 0 strChars = "\ / ! @ # $ % ^ & * ' < > | : ; . ` ~" varChars = Split(strChars, " ") DocTypes(0) = "ACTIONS" DocTypes(1) = "AGENTS" DocTypes(2) = "DATABASESCRIPT" DocTypes(3) = "DATACONNECTIONS" DocTypes(4) = "FORMS" DocTypes(5) = "FORMULA" DocTypes(6) = "PAGES" DocTypes(7) = "SCRIPTLIBRARIES" DocTypes(8) = "SUBFORMS" %REM DocTypes(0) = "ACTIONS" DocTypes(1) = "AGENTS" DocTypes(2) = "DATABASESCRIPT" DocTypes(3) = "DATACONNECTIONS" DocTypes(4) = "FOLDERS" DocTypes(5) = "FORMS" DocTypes(6) = "FRAMESETS" DocTypes(7) = "HELPABOUT" DocTypes(8) = "HELPINDEX" DocTypes(9) = "HELPUSING" DocTypes(10) = "ICON" DocTypes(11) = "IMAGERESOURCES" DocTypes(12) = "FORMULA" DocTypes(13) = "JAVARESOURCES" DocTypes(14) = "MISCCODEELEMENTS" DocTypes(15) = "MISCFORMATELEMENTS" DocTypes(16) = "INDEXELEMENTS" DocTypes(17) = "NAVIGATORS" DocTypes(18) = "OUTLINES" DocTypes(19) = "PAGES" DocTypes(20) = "REPLICATIONFORMULAS" DocTypes(22) = "SCRIPTLIBRARIES" DocTypes(23) = "SHAREDFIELDS" DocTypes(24) = "STYLESHEETRESOURCES" DocTypes(25) = "SUBFORMS" DocTypes(26) = "VIEWS" %END REM iResultLen = 0 For x = LBound(DocTypes) To UBound(DocTypes) GoSub GetScriptFields If Not GETDESIGN_getDesignDocs(db, DocTypes(x), DesignDocs(), ErrMsg) Then GoTo GetNextType i = 0 ForAll doc In DesignDocs varFileName = doc.GetItemValue("$Title") strFileNameTmp = DocTypes(x) & "_" & Join(varFileName, "_")'alleen voor items met alias! Nog aanpassen? For m = 0 To UBound(varChars) strFileNameTmp = FUNCTIONS_replaceAll(strFileNameTmp, varChars(m), "_") Next strFileName = strOutputDir + "\" + strFileNameTmp + "_" + CStr(i + 1) + ".xml" Set stream = sn.CreateStream If Not stream.Open(strFileName) Then GoTo NextForm End If Call stream.Truncate Set exporter = sn.CreateDXLExporter(doc, stream) On Error 4601 GoTo ErrDXLFailed Call exporter.Process If stream.Bytes = 0 Then GoTo NextForm End If Do 'txtBuffer = stream.Readtext() 'txtBuffer = stream.Readtext(STMREAD_LINE, EOL_CRLF) txtBuffer = stream.Readtext(STMREAD_LINE, EOL_ANY) For k = 0 To UBound(varSearchKeywords) If iResultLen > 12000 Then Call stream.Close On Error 75 GoTo ErrFileAccessError Kill strFileName GoTo TheEnd End If If InStr(1, txtBuffer, varSearchKeywords(k), 5) > 0 Then strResult = varSearchKeywords(k) & strSplitter & strFileNameTmp & strSplitter & FullTrim(txtBuffer) If j = 0 Then ReDim Preserve varSearchResult(j) varSearchResult(j) = strResult Else If Not IsNull(ArrayGetIndex(varSearchResult, strResult, 5)) Then GoTo NextKeyword End If ReDim Preserve varSearchResult(j) varSearchResult(j) = strResult iResultLen = iResultLen + Len(strResult) End If j = j + 1 End If NextKeyword: Next %REM If InStr(1, txtBuffer, ".send", 5) > 0 Then ReDim Preserve varSearchResult(j) varSearchResult(j) = strFileNameTmp & strSplitter & FullTrim(txtBuffer) j = j + 1 End If %END REM REM Discard lines with only LF + CR While txtBuffer = Chr(13) & Chr(10) And (Not stream.IsEOS) txtBuffer = stream.Readtext(STMREAD_LINE) Wend Loop Until stream.IsEOS NextForm: Call stream.Close On Error 75 GoTo ErrFileAccessError Kill strFileName If blDXLError Then GoTo TheEnd End If End ForAll GetNextType: Next TheEnd: Exit Sub ErrDXLFailed: 'Quit design check Print "Design exporter operation failed, design may be hidden." blDXLError = True Resume NextForm ErrFileAccessError: 'Path/file Access Error 'Print "Unable to delete file " & strFileName Resume Next ErrorHandler: Print "GETDESIGN_search - Error: " & CStr(Err) & " at line: " & CStr(Erl) & "; " & Error$ Exit Sub '================================================== GetScriptFields: ReDim fns(0) Select Case DocTypes(x) Case "SCRIPTLIBRARIES" ReDim fns(0) fns(0) = fnScriptLib Case "DATABASESCRIPT" ReDim fns(0) fns(0) = fnDBScript Case "FORMS", "SUBFORMS", "PAGES" ReDim fns(0 To 1) fns(0) = fnFormGlobalScript fns(1) = fnFormScript Case "VIEWS" ReDim fns(0 To 1) fns(0) = fnViewGlobalScript fns(1) = fnViewScript Case "FOLDERS" ReDim fns(0 To 1) fns(0) = fnViewGlobalScript fns(1) = fnViewScript Case "AGENTS" ReDim fns(0 To 1) fns(0) = fnAgentGlobalScript fns(1) = fnAgentScript Case Else 'not supported End Select Return Exit Sub End Sub Private Function GETDESIGN_getDesignDocs(db As NotesDatabase, ByVal DesignDocType As String, DesignDocs() As NotesDocument, ErrMsg As String) As Boolean Const LSI_THREAD_PROC = 1 Dim nc As NotesNoteCollection Dim notedoc As NotesDocument Dim nid As String Dim TypeNotFound As Boolean Dim msgNotFound As String Dim x As Long, y As Long msgNotFound = "No design documents found from type " & DesignDocType Set nc = db.CreateNoteCollection(False) Call GETDESIGN_SelectDesignTypeCollection(nc, DesignDocType, TypeNotFound) If TypeNotFound Then ErrMsg = msgNotFound Exit Function Else Call nc.BuildCollection End If nid = nc.GetFirstNoteId y = 0 ReDim DesignDocs(y) For x = 1 To nc.Count Set notedoc = db.GetDocumentByID(nid) If notedoc Is Nothing Then GoTo GetNextNote ReDim Preserve DesignDocs(y) Set DesignDocs(y) = notedoc y = y + 1 GetNextNote: nid = nc.GetNextNoteId(nid) Next If DesignDocs(0) Is Nothing Then ErrMsg = msgNotFound Else GETDESIGN_GetDesignDocs = True End If Exit Function ErrorHandler: Print "GETDESIGN_getDesignDocs - Error: " & CStr(Err) & " at line: " & CStr(Erl) & "; " & Error$ Exit Function End Function Function winCreateFolder(psFolder As String) As Boolean Dim lsDrive As String Dim lsTemp As String Dim liPos As Integer Dim liLastPos As Integer On Error GoTo errorhandler If Mid$(psFolder,2,1)<>":" Then MsgBox ("Please specify a drive for the Dump Path") Exit Function End If lsDrive=Left$(psFolder,2) lsTemp=lsDrive+"\" liLastPos=4 liPos=InStr(4,psFolder,"\") Do Until liPos=0 lsTemp=lsTemp+Mid$(psFolder,liLastPos,(liPos-liLastPos)) If Dir$(lsTemp,ATTR_DIRECTORY)="" Then 'it exists but is not a directory MkDir lsTemp End If liLastPos=liPos+1 liPos=InStr(liLastPos,psFolder,"\") lsTemp=lsTemp+"\" Loop lsTemp=lsTemp+Mid$(psFolder,liLastPos) If Dir$(lsTemp,ATTR_DIRECTORY)="" Then MkDir lsTemp End If winCreateFolder = True Exit Function errorhandler: Resume Next End Function Public Function selectFolder(ByVal psMessage As String, psDefaultFolder As String) As String Const BIF_NEWDIALOGSTYLE = &H00000040 Const BIF_NONEWFOLDERBUTTON = &H00000200 Const BIF_EDITBOX = &H00000010 Const BIF_SHAREABLE = &H00008000 Dim objShell As Variant Dim objFolder As Variant Dim objFolderItem As Variant If psDefaultFolder = "" Then psDefaultFolder = Environ$("USERPROFILE") End If Set objShell = CreateObject("Shell.Application") Set objFolder = objShell.BrowseForFolder(0, "Please select a folder", BIF_SHAREABLE + BIF_EDITBOX + BIF_NEWDIALOGSTYLE, psDefaultFolder) If Not (objFolder Is Nothing) Then Set objFolderItem = objFolder.Self selectFolder = objFolderItem.Path End If End Function Sub GETDESIGN_getDesignElementsSelected(db As NotesDatabase, docInfo As NotesDocument, strOutputDir As String) 'This sub is used for manually exporting design elements from selected databases to files, 'and then upload them into the Notes document. 'here are some fields which carrying the scripting text according to the design document Const fnScriptLib = "$ScriptLib" Const fnDBScript = "$DBScript" Const fnFormGlobalScript = "$Script" Const fnFormScript = "$$FormScript" Const fnViewGlobalScript = "$ViewGlobalScript" Const fnViewScript = "$ViewScript" Const fnAgentGlobalScript = "$AgentGlobalScript" Const fnAgentScript = "$AgentScript" Dim sn As New NotesSession Dim DocTypes(26) Dim DesignDocs() As NotesDocument Dim fns As Variant Dim ErrMsg As String Dim x As Long, updated As Boolean Dim strFileName As String Dim stream As NotesStream Dim exporter As NotesDXLExporter Dim varFileName Dim i As Integer Dim varFiles() Dim txtBuffer As String DocTypes(0) = "ACTIONS" DocTypes(1) = "AGENTS" DocTypes(2) = "DATABASESCRIPT" DocTypes(3) = "DATACONNECTIONS" DocTypes(4) = "FOLDERS" DocTypes(5) = "FORMS" DocTypes(6) = "FRAMESETS" DocTypes(7) = "HELPABOUT" DocTypes(8) = "HELPINDEX" DocTypes(9) = "HELPUSING" DocTypes(10) = "ICON" DocTypes(11) = "IMAGERESOURCES" DocTypes(12) = "FORMULA" DocTypes(13) = "JAVARESOURCES" DocTypes(14) = "MISCCODEELEMENTS" DocTypes(15) = "MISCFORMATELEMENTS" DocTypes(16) = "INDEXELEMENTS" DocTypes(17) = "NAVIGATORS" DocTypes(18) = "OUTLINES" DocTypes(19) = "PAGES" DocTypes(20) = "REPLICATIONFORMULAS" DocTypes(22) = "SCRIPTLIBRARIES" DocTypes(23) = "SHAREDFIELDS" DocTypes(24) = "STYLESHEETRESOURCES" DocTypes(25) = "SUBFORMS" DocTypes(26) = "VIEWS" GETDESIGN_processAttachments docInfo, varFiles, "rem" For x = LBound(DocTypes) To UBound(DocTypes) GoSub GetScriptFields If Not GETDESIGN_getDesignDocs(db, DocTypes(x), DesignDocs(), ErrMsg) Then GoTo GetNextType Print db.Title & ": Exporting " & DocTypes(x) & " XML to " & strOutputDir i = 0 ReDim varFiles(0) varFiles (0) = "" ForAll doc In DesignDocs varFileName = doc.GetItemValue("$Title") strFileName = DocTypes(x) & "_" & Join(varFileName, "_")'alleen voor items met alias! Nog aanpassen? strFileName = strOutputDir + "\" + FUNCTIONS_replaceAll(strFileName, "\", "-") + "_" + CStr(i + 1) + ".xml" ReDim Preserve varFiles(i) varFiles(i) = strFileName i = i + 1 Set stream = sn.CreateStream If stream.Open(strFileName) Then Call stream.Truncate Set exporter = sn.CreateDXLExporter(doc, stream) Call exporter.Process End If Call stream.Close End ForAll Print db.Title & ": Attaching " & DocTypes(x) & " XML files to the document..." GETDESIGN_processAttachments docInfo, varFiles, "add" GetNextType: Next Exit Sub ErrorHandler: Print "Error in GETDESIGN_getDesignElementsSelected at line " & CStr(Erl()) & ": code = " & CStr(Err()) & ", message = " & CStr(Error()) Exit Sub '================================================== GetScriptFields: ReDim fns(0) Select Case DocTypes(x) Case "SCRIPTLIBRARIES" ReDim fns(0) fns(0) = fnScriptLib Case "DATABASESCRIPT" ReDim fns(0) fns(0) = fnDBScript Case "FORMS", "SUBFORMS", "PAGES" ReDim fns(0 To 1) fns(0) = fnFormGlobalScript fns(1) = fnFormScript Case "VIEWS" ReDim fns(0 To 1) fns(0) = fnViewGlobalScript fns(1) = fnViewScript Case "FOLDERS" ReDim fns(0 To 1) fns(0) = fnViewGlobalScript fns(1) = fnViewScript Case "AGENTS" ReDim fns(0 To 1) fns(0) = fnAgentGlobalScript fns(1) = fnAgentScript Case Else 'not supported End Select Return Exit Sub End Sub Public Sub GETDESIGN_processAttachments(docInfo As NotesDocument, varFiles, strType As String) Dim rtitem As NotesRichTextItem Dim obj As NotesEmbeddedObject Dim attRemove() Dim i As Integer On Error GoTo ErrorHandler On Error 4225 GoTo ErrorNoSuchPath 'NOTES_ERR_NOSUCH_PATH = 4225 Dim strAttFieldName As String strAttFieldName = "DbAttachments" Select Case strType Case "rem" If docInfo.hasItem(strAttFieldName) Then Set rtitem = docInfo.GetFirstItem(strAttFieldName) 'Create array of filenames of all the attachments In the document i = 0 ReDim attRemove(i) ForAll x In docInfo.items If x.name = "$FILE" Then attRemove(i) = x.values(0) i = i + 1 ReDim Preserve attRemove(i) End If End ForAll If i > 0 Then 'First remove all attachments from the attachments field If attRemove(0) <> "" Then ForAll x In attRemove Set obj = rtitem.GetEmbeddedObject(x) If Not(obj Is Nothing) Then If (obj.Type = EMBED_ATTACHMENT) Then Call obj.Remove End If End If End ForAll End If End If End If Case "add" If docInfo.hasItem(strAttFieldName) Then Set rtitem = docInfo.GetFirstItem(strAttFieldName) Else Set rtitem = New NotesRichTextItem(docInfo, strAttFieldName) End If For i = 0 To UBound(varFiles) If varFiles(i) <> "" Then Call rtitem.EmbedObject(EMBED_ATTACHMENT, "", varFiles(i)) End If Next %REM 'Front-end trial which is not working... Dim ws As New NotesUIWorkspace Dim uidoc As NotesUIDocument Dim docTmp As NotesDocument Set docTmp = docInfo tmpFormula = |@Command( [EditInsertFileAttachment] ; varFiles(i) ; 0 ; 1 ; 0 ; 0 )| Set uidoc = ws.Editdocument(True, docTmp, False, "", True, False) Call uidoc.GotoField(strAttFieldName) For i = 0 To UBound(varFiles) Evaluate(tmpFormula) Next Set docTmp = uidoc.Document Call docTmp.save(True, False) %END REM End Select Exit Sub ErrorNoSuchPath: 'Skip this file Resume Next Exit Sub ErrorHandler: Print "GETDESIGN_processAttachments - Error: " & CStr(Err) & " at line: " & CStr(Erl) & "; " & Error$ Exit Sub End Sub Private Sub GETDESIGN_SelectDesignTypeCollection(nc As NotesNoteCollection, ByVal DocType As String, NotFound As Boolean) Select Case UCase(DocType) Case "ACTIONS" nc.SelectActions = True Case "AGENTS" nc.SelectAgents = True Case "DATABASESCRIPT" nc.SelectDatabaseScript = True Case "DATACONNECTIONS" nc.SelectDataConnections = True Case "FOLDERS" nc.SelectFolders = True Case "FORMS" nc.SelectForms = True Case "FRAMESETS" nc.SelectFramesets = True Case "HELPABOUT" nc.SelectHelpAbout = True Case "HELPINDEX" nc.SelectHelpIndex = True Case "HELPUSING" nc.SelectHelpUsing = True Case "ICON" nc.SelectIcon = True Case "IMAGERESOURCES" nc.SelectImageResources = True Case "FORMULA" nc.SelectionFormula = True Case "JAVARESOURCES" nc.SelectJavaResources = True Case "MISCCODEELEMENTS" nc.SelectMiscCodeElements = True Case "MISCFORMATELEMENTS" nc.SelectMiscFormatElements = True Case "INDEXELEMENTS" nc.SelectMiscIndexElements = True Case "NAVIGATORS" nc.SelectNavigators = True Case "OUTLINES" nc.SelectOutlines = True Case "PAGES" nc.SelectPages = True Case "REPLICATIONFORMULAS" nc.SelectReplicationFormulas = True Case "SCRIPTLIBRARIES" nc.SelectScriptLibraries = True Case "SHAREDFIELDS" nc.SelectSharedFields = True Case "STYLESHEETRESOURCES" nc.SelectStyleSheetResources = True Case "SUBFORMS" nc.SelectSubforms = True Case "VIEWS" nc.SelectViews = True Case Else NotFound = True End Select End Sub |