So I've made some progress but I'm getting a compile error "Function call on left hand side of the assignment must return Variant or Object". Any ideas?

Right now all it's doing is opening a pdf, reading the number of pages, opening another pdf, asking how many pages are in it (because for some reason if it has more than 1 page then it returns a -1 which means it doesn't know). If the number you enter is larger than 1, it inserts the page from "OPC_backup" as many times as there are pages.


   
    Dim AcroApp As Acrobat.CAcroApp
    Dim Part1Document As AcroPDDoc, Part2Document As AcroPDDoc, Part3Document As AcroPDDoc
    Dim jsObj As Object
    Dim npgs1 As Integer, npgs2 As Integer
    Dim x As Integer
    
    Set AcroApp = CreateObject("AcroExch.App")
       
    Set Part1Document = CreateObject("AcroExch.PDDoc")
    Set Part3Document = CreateObject("AcroExch.PDDoc")
    Part1Document.Open (OPC)
    Part3Document.Open (OPC_backup)
    npgs1 = Part1Document.GetNumPages()
    npgs2 = InputBox("How many pages of Data is there?")
    x = npgs2 - npgs1
    
    For y = 1 To x
        Part1Document.InsertPages(0, Part3Document, 0, 1, False) = False
        y = y + 1
        Next y
    End
Thanks!