digitaldrew
Well-known member
- Joined
- Nov 10, 2012
- Messages
- 167
- Programming Experience
- Beginner
Hey everyone..Hopefully someone can shed some light into this for me.
I'm working on a small program that will take a URL and convert it into a PDF. I already have the url/pdf converting component referenced and it works fine. However, when I try to set it so it pulls the URLs from a listbox I keep getting the exception 'Invalid URI: The format of the URI could not be determined.' The format of the url is proper with http://...
Here is some of my code
This is the particular line giving me the exception
I'm working on a small program that will take a URL and convert it into a PDF. I already have the url/pdf converting component referenced and it works fine. However, when I try to set it so it pulls the URLs from a listbox I keep getting the exception 'Invalid URI: The format of the URI could not be determined.' The format of the url is proper with http://...
Here is some of my code
VB.NET:
Private Sub btnConvertUrlToPdf_Click(sender As System.Object, e As System.EventArgs) Handles btnConvertUrlToPdf.Click
Dim url_html As New Uri("lstUrlToPdf.SelectedItem")
ProgressBar6.Maximum = lstUrlToPdf.Items.Count
ProgressBar6.Step = 1
If lstUrlToPdf.Items.Count = 0 Then
MsgBox("Please Add At Least One URL File To Convert!")
ElseIf txtUrlToPdf.Text = "" Then
MsgBox("Please Select Your Destination Folder!")
Else
'call sub to perform file conversion
For x As Integer = 0 To lstUrlToPdf.Items.Count - 1
lstUrlToPdf.SetSelected(x, True)
OpenURL(url_html)
ProgressBar6.PerformStep()
Next x
MsgBox("Conversion Completed Successfully!")
ProgressBar6.Value = 0
End If
End Sub
This is the particular line giving me the exception
VB.NET:
Dim url_html As New Uri("lstUrlToPdf.SelectedItem")