Nav Automation

Can someone review this codes and tell me why the hell it has this error:

This Automation variable has not been instantiated. You can either instantiate it by eather creating or assigning it. Above all the codes are combiling very well but when i run the codes its when i receive the error. I think the automation variable is PDFCreatorOption but have already done it at globals like this

Name DataType Subtype Length
PDFCreator Automation ‘PDFCreator’.clsPDFCreator
PDFCreatorOption Automation ‘PDFCreator’.clsPDFCreatorOptions
PDFCreatorError Automation ‘PDFCreator’.clsPDFCreatorError

PDFCreatorOption.PDFUseSecurity :=1;
PDFCreatorOption.PDFOwnerPass := 1;
PDFCreatorOption.PDFOwnerPasswordString := ‘MasterPass’;

PDFCreatorOption.PDFDisallowCopy := 1;
PDFCreatorOption.PDFDisallowModifyContents := 1;
PDFCreatorOption.PDFDisallowPrinting := 1;

PDFCreatorOption.PDFUserPass := 1;
PDFCreatorOption.PDFUserPasswordString := ‘UserPass’;

PDFCreatorOption.PDFHighEncryption := 1;

PDFCreatorOption.UseAutosave := 1;
PDFCreatorOption.UseAutosaveDirectory := 1;
PDFCreatorOption.AutosaveDirectory := FileDirectory;
PDFCreatorOption.AutosaveFormat := 0; //PDF file, you can also save in other formats
PDFCreatorOption.AutosaveFilename := FileName2;

PDFCreator.cOptions := PDFCreatorOption;
DefaultPrinter := PDFCreator.cDefaultPrinter;
PDFCreator.cDefaultPrinter := ‘PDFCreator’;
PDFCreator.cPrinterStop := FALSE;

AttachFile := FileFolder+‘Navision pdf.pdf’ ;
IF Mail.NewMessage (EmailAdd, ‘’, Subject, Body, AttachFile, FALSE) THEN
NoOfEmails += 1;

You need to add IF ISCLEAR(PDFCreator) THEN CREATE(PDFCreator);