![open a pdc file open a pdc file](https://www.solvusoft.com/file-extensions/images/software/200x200/3062_locklizard-secure-pdf-viewer.png)
![open a pdc file open a pdc file](https://www.tecmint.com/wp-content/uploads/2014/10/Add-DNS-IPs-1024x706.jpg)
' toolbar : Turns the toolbar on or off 1=Turn on, 0=Turn off ' scrollbar : Turns scrollbars on or off 1=Turn on, 0=Turn off ' pagemode : Displays bookmarks or thumbnails bookmarks, thumbs, none ' zoom : Numerical value representing a zoom factor 100=100%, 65=65%. ' page : Page number to open the document at
#OPEN A PDC FILE PDF#
' sFile : Fully qualified pathe and filename, including extension, of the PDF to It may not be sold/resold or reposted on other sites (links ' copyright notice is left unchanged (including Author, Website and ' Copyright : The following may be altered and reused as you wish so long as the ' Purpose : Open a PDF on a specific page ' Author : Daniel Pineault, CARDA Consultants Inc. VbCritical, "An Error has Occurred!" Resume Error_Handler_Exit "Error Description: " & Err.Description, _ "Error Number: " & Err.Number & vbCrLf & _ MsgBox "The following error has occurred." & vbCrLf & vbCrLf & _ On Error Resume Next Set WSHShell = Nothing Exit Function ' 'Open the file using FollowHyperlink (user will get prompts) ' sCmd = Replace(sFile, "\", "/") & "#" & sParameters ' Application.FollowHyperlink sCmd End If Shell sAcrobatPath & " " & Chr(34) & sFile & Chr(34), vbNormalFocusĮlse 'Parameters 'Open the file using Shell (no prompt) SParameters = sParameters & "&" & "navpanes=" & navpanesĮnd If End If 'Open our PDF If Len(sParameters) = 0 Then 'No parameters SParameters = sParameters & "&" & "messages=" & messagesĮnd If End If If Not IsMissing(navpanes) Then If Len(sParameters) = 0 Then SParameters = sParameters & "&" & "statusbar=" & statusbarĮnd If End If If Not IsMissing(messages) Then If Len(sParameters) = 0 Then SParameters = sParameters & "&" & "toolbar=" & toolbarĮnd If End If If Not IsMissing(statusbar) Then If Len(sParameters) = 0 Then SParameters = sParameters & "&" & "scrollbar=" & scrollbarĮnd If End If If Not IsMissing(toolbar) Then If Len(sParameters) = 0 Then SParameters = sParameters & "&" & "pagemode=" & pagemodeĮnd If End If If Not IsMissing(scrollbar) Then If Len(sParameters) = 0 Then SParameters = sParameters & "&" & "zoom=" & zoomĮnd If End If If Not IsMissing(pagemode) Then If Len(sParameters) = 0 Then SParameters = sParameters & "&" & "page=" & pageĮnd If End If If Not IsMissing(zoom) Then If Len(sParameters) = 0 Then 'Build our parameters If Not IsMissing(page) Then If Len(sParameters) = 0 Then SAcrobatPath = WSHShell.RegRead( "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\AcroRd32.exe\") ' pagemode : Displays bookmarks or thumbnails bookmarks, thumbs, none ' scrollbar : Turns scrollbars on or off 1=Turn on, 0=Turn off ' toolbar : Turns the toolbar on or off 1=Turn on, 0=Turn off ' statusbar : Turns the status bar on or off 1=Turn on, 0=Turn off ' messages : Turns the document message bar on or off 1=Turn on, 0=Turn off ' navpanes : Turns the navigation panes and tabs on or off 1=Turn on, 0=Turn off ' ' Usage: ' ~~~~~~ ' OpenPDF "C:\Users\Daniel\Documents\Test\Test.pdf",3,"none",1,0,0,0,0 ' ' Revision History: ' Rev Date(yyyy/mm/dd) Description ' ************************************************************************************** ' 1 2013-Dec-04 Initial Release ' 1 2013-Dec-04 More advanced options added '- Function OpenPDF(sFile As String, _ĭim WSHShell As Object Dim sAcrobatPath As String Dim sParameters As String Dim sCmd As String 'Determine the path to Acrobat Reader Set WSHShell = CreateObject( "Wscript.Shell") ' page : Page number to open the document at ' zoom : Numerical value representing a zoom factor 100=100%, 65=65%. ' Reference : ' ' Input Variables: ' ~~~~~~~~~~~~~~~~ ' sFile : Fully qualified pathe and filename, including extension, of the PDF to ' open. It may not be sold/resold or reposted on other sites (links ' back to this site are allowed). ' Website : ' Purpose : Open a PDF on a specific page ' Copyright : The following may be altered and reused as you wish so long as the ' copyright notice is left unchanged (including Author, Website and ' Copyright). '- ' Procedure : OpenPDF ' Author : Daniel Pineault, CARDA Consultants Inc.