Dear all
My attached excel sheet has list of invoices on sheet (invoice) - third sheet , Column B has invoice numbers and Colum E has hyperlinks which are coming from the SQL server, these hyperlinks to open the invoices in WORD format;
This is the location of the one of the invoice "\\svr-storage3\Accounts_Data\Docs\H\H\A\HHA6\62\Bill ref 223615_458254_1.doc"
I have a PrintView Command Button, when it is clicked it opens the invoices in Word format.
My question is , Is there a way when the PrintView Button is clicked , it opens the invoices in PDF format rather than Word format?
Here is my existing code.
Private Sub PrintView_Click()
Sheets("invoice").Select
Dim fnd As Range
With Range("B:B")
.NumberFormat = "0"
.Value = .Value
End With
Set fnd = Range("B:B").Find(TextBox5.Value, lookat:=xlWhole)
If Not fnd Is Nothing Then
Unload Me
ThisWorkbook.FollowHyperlink (fnd.Offset(, 3).Value)
Else: MsgBox "Number not found!"
End If
UserForm1.Show
End Sub