I will like to load .pdf file or .rtf which i have my help on it when running my vb program.
How i i go by it.
Printable View
I will like to load .pdf file or .rtf which i have my help on it when running my vb program.
How i i go by it.
The simplest solution is to load the file into a RichTextBox control.
The plain text will be returned by the control's .Text property:
Dim sText As String
With rtfText
.FileName = "C:\Temp\Test01.rtf"
sText = .Text
End With
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
ShellExecute 0&, "open", fileName, "", "", vbNormalFocus
this works for me
you could alternatively consider to use the pdf.ocx ( shipped woth the reader )
just add it to your project then you can also easily print the pdf etc etc