How to Split PDF and Merge PDF in VB ?

Private Sub Command1_Click()
    Dim obj As Object
    Dim iRtn As Integer
    Dim iPageCount As Integer
  
    'Create object
    Set obj = CreateObject("PDFSplitMergeX.SplitMergeLib")
      
    'Set your license key
    obj.SetLicenseKey ("License Code")
  
    'Split PDF file
    iRtn = obj.Split("..\PDF-Split-Merge-ActiveX-DLL.pdf","","1,2-3,4-5,6","..\split-%d.pdf")
    If iRtn = 1 Then
      MsgBox "Split Successfuly."
    End If

    'Merge PDF file
    iRtn = obj.Merge('..\split-1.pdf|..\split-2.pdf?1-1', '..\merge-1.pdf');
    If iRtn = 1 Then
      MsgBox "Merge Successfuly."
    End If

    'Get Page Count
    iPageCount = obj.GetPageCount("..\PDF-Split-Merge-ActiveX-DLL.pdf", "");
    
    Set obj = Nothing
End Sub