Ok, I fixed the syntax error and got the code above to work. It opened, exported, and then closed the file. However, It exported one big PDF file. I need it to open the big pdf file, read it, and separate the big pdf file automatically into smaller pdfs by location.