locked
Atribuir Textbox no hyperlink RRS feed

  • Pergunta

  • Pessoal,

    Como faço para atribuir os dados do formulário - =[CONTRATOS] & "_id" & [ID_Digital] & "_" & [n_processo] & "_" & Formulário!NOME & "_" & [Descrição Doc] no path conforme o código abaixo.

    Code:

    Private Sub Comando21_Enter()

    'First, set a Reference to the Microsoft Office XX.X Object Library
     
    Dim strButtonCaption As String, strDialogTitle As String
    Dim strHyperlinkFile As String, strSelectedFile As String
    Dim Forms As [Form_2-2 Formulário Contratos - Inclusão]


    'Define your own Captions if necessary
    strButtonCaption = "Salvar Hyperlink"
    strDialogTitle = "Selecione o arquivo para criação do Hyperlink"
     
    With Application.FileDialog(msoFileDialogFilePicker)
      With .Filters
        .Clear
        .Add "All Files", "*.*"     'Allow ALL File types
      End With
      'The Show Method returns True if 1 or more files are selected
        .AllowMultiSelect = False       'Critical Line
        .FilterIndex = 1 'Database files
        .ButtonName = strButtonCaption
        .InitialFileName = vbNullString
        .InitialView = msoFileDialogViewDetails     'Detailed View
        .Title = strDialogTitle
      If .Show Then
        For Each varItem In .SelectedItems 'There will only be 1
          'Display Text + # + Address of Hyperlink (Display Text#Hyperlink Address)
          strSelectedFile = varItem
          strHyperlinkFile = fGetBaseFileName(strSelectedFile) & "#" & strSelectedFile
          Me![Link] = strHyperlinkFile
         
        Next varItem
      End If
    End With
    ' Me.txtHyperlink = "F:DataCPPCPP PDF" & [TxtPipeSize] & "" & [DrawingFile] & "" & [PartNumber] & ".sht" & [TxtSheetNo] & ".Rev" & [TxtRevNo] & ".pdf"
    ' =[CONTRATOS] & "_id" & [ID_Digital] & "_" & [n_processo] & "_" & Formulário!NOME & "_" & [Descrição Doc]

    End Sub

    segunda-feira, 22 de março de 2010 00:44