Link to home
Start Free TrialLog in
Avatar of gdunn59
gdunn59

asked on

Compile Error - Argument not optional - MS Access - VBA - Adobe Acrobat

I have the following VBA Code in MS Access. When I run it, I'm getting the following error:

  Compile error:
  Argument not optional

The error is occurring on Line 6 of the Code.

Function GetFileText(strFilePath As String) As String
 Dim doc As New AcroAVDoc
 Dim pdoc As New AcroPDDoc
  
  doc.Open strFilePath, ""
  doc.Open
  
  Set pdoc = doc.GetPDDoc

  GetFileText = Acro_GetPageText(pdoc)

ErrHandler:
  Set pdoc = Nothing
  Set doc = Nothing

End Function

Open in new window

Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

I don't have Adobe to test, but it looks like you can delete that line entirely as it's already being opened in row 5.
ASKER CERTIFIED SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial