Guest User

Untitled

a guest
Jan 17th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. If Me.lstSelectedFiles.ListCount > 0 Then
  2. 'loop through selected files
  3. For i = 0 To Me.lstSelectedFiles.ListCount - 1
  4. Selection.InsertFile FileName:=Me.lblFilePath.Caption & "" & Me.lstSelectedFiles.List(i), Range:="", _
  5. ConfirmConversions:=False, Link:=False, Attachment:=False
  6. Next
  7. Selection.TypeBackspace 'remove last page break
  8. Else
  9. MsgBox "You must add at least one file to the selected files list", vbCritical
  10. End If
  11. Unload Me
Add Comment
Please, Sign In to add comment