I am trying to save a PDF with the Name and DateTime details in a filename.
To do this I am saving an email into PDF and writing the filename with using the “Type into” activity but I am having some trouble writing the variable with the filename. It only seems to like fixed text. I am just trying to write the Date Time in the example below.
My Variable is being represented as “” when it is not actually blank (as supported by the write line activity).
My workflow looks like is taken from:
1. Within For Each Activity for Outlook emails
- Str_DateTime = item.Headers(“Date”).ToString
2. Str_DateTimeCLEAN = System.Text.RegularExpressions.Regex.Replace(str_DateTime, “\/|:”, “-”)
- Cleaning variable using Regex Replace method of any “\” or “:” and replacing them with “-” so its suitable for filename format.
3. Str_DateTimeCLEAN = 08-03-2020 14-24-44
Write line activity result:
4. Type into activity is simply just treating the variable like its ""
Save as Result (screenshot):
Expression Editor: (added END for visual)
My Workflow Main.xaml (60.3 KB)
Its probably something simple that I have missed…
Any thoughts or assistance are always appreciated.