Hello. I have written some code to save a pdf file. However, I want to
add code to compress the file, so the file-size will be reduced.
Does anybody know kow can I do this, or just point me in the right
direction?

My code:

Dim AcroExchApp As Acrobat.CAcroApp
Dim PDDoc As Acrobat.CAcroPDDoc
Dim avdoc As Acrobat.CAcroAVDoc

AcroExchApp = CreateObject("AcroExch.App")

PDDoc = CreateObject("AcroExch.PDDoc")
avdoc = CreateObject("AcroExch.AVDoc")

avdoc.Open(<sourceFile>, <sourceFile>)
avdoc = AcroExchApp.GetActiveDoc

If avdoc.IsValid Then
PDDoc = avdoc.GetPDDoc
If PDDoc.Save(1 Or 4 Or 32, <targetFile>) <> True Then
'messagebox.show("Error while saving")
End If
PDDoc.Close()
PDDoc = Nothing
End If

avdoc.Close(True)
avdoc = Nothing

AcroExchApp.Exit()
AcroExchApp = Nothing

Thanks in advance
Wouter