ISLibraryDocument.Show

Description

This function shows the specified library document.

Syntax

object.Show

Part Attribute Type Description
object Required
The object always implements the ISLibraryDocument interface

Example

Find the library document by its name and show it after user confirmation.

sub main
  Dim aDocumentName 
  Dim aLibrary
  
  aDocumentName = InputBox("Enter document name to open:")
  if aDocumentName = "" then exit sub
    
  Set aLibrary = Profile.LoadRootLibrary
  ProcessLibraryTree aLibrary, "", aDocumentName
end sub
     
sub ProcessLibraryTree(aLibrary, aPath, aDocumentName)
  Dim aFullPath
  Dim aDoc
  Dim aInfo
  Dim aResult
  Dim i
    
  if aPath <> "" then        
    aFullPath = aPath & "\" & aLibrary.Name
  else
    aFullPath = aLibrary.Name
  end if
        
  set aDoc = aLibrary.GetDocumentByName(aDocumentName)
  if not aDoc is nothing then
    aInfo = aFullPath & "\" & aDoc.Name
    aResult = MsgBox("Would you like to open document " & vbNewLine & aInfo & " ?",_
      vbYesNo, "Open document")
    if aResult = vbYes then aDoc.Show
  end if 
     
  for i = 0 to aLibrary.Count - 1
    ProcessLibraryTree aLibrary.SubLibrary(i), aFullPath, aDocumentName  
  next
end sub  
Note:

In Profile Client v8 on User Interface the library document can be opened by clicking the 'Open saved document' button in Maintain > Library > Items toolbar.

Version information

Added in v7.10.60