Text Viewer SDK ActiveX

Text Viewer SDK ActiveX

Platform : Windows 10, Windows 8, Vista, Windows 7, XP

Let your application support display text file, PDF with text mode, XML file and document navigation with VB.Net ,VB6, C#, C++, Delphi, Vfp, MS Access.

Popular Solution Go   Back

MS Access 2016 - How to display Multi-Page of Text File

Step 1: To install the Text Viewer SDK, begin by launching the setup file (http://www.viscomsoft.com/demo/textviewersetup.exe). Select the desired installation folder for the Text Viewer SDK and continue with the installation on your development computer.

Step 2: Launch MS Access 2016. select Blank database.
Step 3: Select Create Tab, select Form Design. 

Step 4 Select Design Tab, Select ActiveX Control. Select Text Viewer ActiveX Control.

Step 5: Resize the Text Viewer ActiveX Control on form and add one button on form.

Step 5: double click button 1 , then  Select Tools - References... , select  Microsoft Office 16.0 Object Library, click OK button.

Step 6: In Command1 click event, add the following code

Private Sub Command1_Click()

Dim dlg As Object
Dim bResult As Boolean

Dim obj As TextReaderAx
Set obj = Me.TextReaderAx0.Object

Set dlg = Application.FileDialog(msoFileDialogOpen)

bResult = dlg.Show

If bResult Then

  If obj.OpenFile(dlg.SelectedItems(1)) = 1 Then
     MsgBox "Open Failed"
  End If
End If

End Sub