ATC: ATTACH MAKEPDF FILTER filter;
This command selects the first attached Microsoft Word file that matches a filter and creates a corresponding PDF file. The Word file is changed to disable bookmarks and marked as “not sent”. Effectively, this ATC verb is the same as the “Make PDF” command in the user interface. After this command, TargetRow points to the new PDF attachment.
- FILTER filter; requires the semicolon (;). This option specifies a filter for selecting the attachment to convert to PDF. Use .NET Data Expression syntax (for more information see the Data Dictionary and .NET data expression syntax). Only the first match is processed by this command. The filter can also be assigned to a variable using ATC: SET; however, the semicolon goes after the variable name—not in the ATC: SET command.
ATC: SET $Filter = FileName LIKE '*Waiver.pdf' ATC: TARGET DocAttachedFile BY FileName WITH $Filter; ATC: IF HASNOT DocAttachedFile WITH $Filter; ATC: SET $Filter = FileName LIKE '*Waiver.doc*' ATC: ATTACH MAKEPDF FILTER $Filter; ATC: ENDIF
The above example means “Set an attachment filter to Waiver.pdf then look at the attachments for a file that matches Waiver.pdf. If no such file is found, set the filter to Waiver.doc* (for .doc and docx files) then make a PDF file for the first matching file.” See ATC: ADD UIA for an example using TargetRow to download the new PDF.
Last updated: December 30, 2020 at 11:18 am; green text = new