Hi guys i'm brand new to coding but i have somehow (haha) managed to export my excel into PDF. Now Im having difficulties trying to have the PDF automatically open in PDF XChange Viewer instead of Adobe Reader.
Here are my codes:
Sub Export()
Dim wsA As Worksheet
Dim wsB As Workbook
Dim strPath As String
Dim myFile As Variant
Set wbA = ActiveWorkbook
Set wsA = ActiveWorksheey
strPath = wbA.Path
If strPath = "" Then
strPath = Application.DefaultFilePath
End If
strPath = strPath & "\"
myFile = Application.GetSaveAsFilename _
(FileFilter:="PDF Files (*.pdf), *.pdf", _
Title:="Select Folder and FileName to save")
If myFile <> "False" Then
wsa.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=myFile, _
Quality:=xlQualityStandard,_
IncludeDocProperties:=True,_
IgnorePrintAreas:=False,_
OpenAfterPublish:=True
End If
End Sub
Disclaimer i copied the codes from somewhere online because i wanted to allow users to name the file, select where they save it.
What should i do to open the PDF in PDFXChange Viewer. The directory is: C:\Program Files\Tracker Software\PDF Viewer