francozola25
08-19-2008, 08:20 AM
Hello
I was wondering if someone could help me.
I wanto print off a .pdf file as part of a dropdown variable but it doesn't seem to work
Note: the file is already in .pdf so there is not need to convert from word before hand.
I have a combobox on a userform that display the filename contents of a folder:
This is the code for combobox
Private Sub UserForm_Initialize()
'Files in folder listed in Listbox1
Dim FSO As Object, fld As Object, Fil As Object
Dim SubFolderName As String
Dim i As Integer
Set FSO = CreateObject("Scripting.FileSystemObject")
Me.ComboBox1.Clear 'clear previous entries
SubFolderName = "\\myserver\Documents (file://\\myserver\Documents)"
Set fld = FSO.GetFolder(SubFolderName)
For Each Fil In fld.Files
i = i + 1
Me.ComboBox1.AddItem Fil.Name
Next Fil
End Sub
the insert button is pressed along with other fields complete. What i want to do then is to open the ComboBox1 pdf file and print it off but it doesn't seem to work
I was wondering if someone could help me.
I wanto print off a .pdf file as part of a dropdown variable but it doesn't seem to work
Note: the file is already in .pdf so there is not need to convert from word before hand.
I have a combobox on a userform that display the filename contents of a folder:
This is the code for combobox
Private Sub UserForm_Initialize()
'Files in folder listed in Listbox1
Dim FSO As Object, fld As Object, Fil As Object
Dim SubFolderName As String
Dim i As Integer
Set FSO = CreateObject("Scripting.FileSystemObject")
Me.ComboBox1.Clear 'clear previous entries
SubFolderName = "\\myserver\Documents (file://\\myserver\Documents)"
Set fld = FSO.GetFolder(SubFolderName)
For Each Fil In fld.Files
i = i + 1
Me.ComboBox1.AddItem Fil.Name
Next Fil
End Sub
the insert button is pressed along with other fields complete. What i want to do then is to open the ComboBox1 pdf file and print it off but it doesn't seem to work