اذهب الي المحتوي
أوفيسنا

فتح ملف pdf بواسطة زر داخل الفورم


الردود الموصى بها

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
ByVal hWnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long

Private Const SW_SHOWMAXIMIZED As Long = 3
Private Const SW_SHOWNORMAL As Long = 1
Sub CommandButton4_Click()
Dim strPath As String
strPath = "D:\" & "\" & TextBox1.Value & ".pdf"
If ShellExecute(0&, "Open", strPath, 0&, 0&, SW_SHOWNORMAL) < 33 Then
MsgBox "Couldn't open PDF file.", vbInformation
End If
End Sub
رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information