Message 1 of 13
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to figure out how to detect from external rule if one parametr exist in Assembly/or part. If not, then create it and continue. If yes, skip the creation and continue in rule.
So far without the parameter detection, I got this:
FILE_NAME = "\PDF_SAVE\" 'Path setting
oMyParameter=ThisApplication.ActiveDocument.ComponentDefinition.Parameters.UserParameters
oParameter=oMyParameter.AddByValue("EXTERNAL", "True", UnitsTypeEnum.kTextUnits) 'Create EXTERNAL parameter
oParameter=oMyParameter.AddByValue("PDF", "True", UnitsTypeEnum.kTextUnits) ' Create PDF parameter 'So far this works, but it creates EXTERNAL_1 if EXTERNAL exists
'Check if Save As Should proceed If Parameter("EXTERNAL") = "True" Then FILE_SAVEAS = ThisDoc.Path & FILE_NAME & ThisDoc.FileName(False) Else FILE_SAVEAS = ThisDoc.Path & ThisDoc.FileName(False) End If If Parameter("EXTERNAL") = "False" Then Return 'No Save As set? Then close the rule 'PDF Yes/No? If Parameter("PDF") = "True" Then ThisDoc.Document.SaveAs(FILE_SAVEAS & (".pdf") , True) End If
Any Advice for this parameter detect for first block of code? Thank you
Solved! Go to Solution.