Set Variable [$Path ; Value: "file:/D:/TodaysLog/TodaysLog" & " " & Get ( CurrentDate) ; "/" ; "-" ) & ".PDF" ]
Save Records as PDF [ Restore; No Dialog ; $Path ; //choose options that you want for the rest here ]
Set Variable [$Path ; Value: "file:/D:/TodaysLog/TodaysLog" & " " & Substitute ( Get ( CurrentDate) ; "/" ; "-" ) & ".PDF" ]
Thanks for the correction, Daniele. I simplified an actual expression I use for this purpose and deleted a bit too much of the original.
Thanks for the quick reply shown below is what i have ended up with,
Set Variable [$Path; Value: "file/D:/TodaysLog/TodaysLog\"& \"\" & Get ( CurrentDate) ; \"/\" ; \"-\" ) & \".PDF"]
Save Records as PDF [Restore; No dialog; "TodaysLog.pdf"; Create email; Recorda being browsed]
Send Mail [Send via E-mail Client; To: "TodaysLog (email@example.com)"; Subject: "TodaysLog"; Message: "This is todays log."; "TodaysLog.pdf"]
Now when i look in D:/TodaysLog should the TodayLog.pdf file have the date with it e.g TodaysLog\6\62010.pdf because if it should it dose not, Have i done something wrong.
One other thing that happens is that i have to add the email address to the email even though it has allready been entered in the To: in the E-Mail Client setup.
Slashes (either frontslash or backslash) shouldn't be used in file names, which is why Phil and Daniele suggested using Substitute() to change the slashes to dashes. Try creating a simple text file and naming it with either character and it should give you error message showing which characters are invalid in file names (depending upon OS and version probably).
Instead of trying to send the email in the Save As PDF portion, send it as attachment in your Send Mail script-step. You specify the attachment as $path.
Thank you all very much for your help, am still trying to understand this scripting stuff just not clicking for me.