Mark Johnson Posted August 22, 2008 Posted August 22, 2008 I came across and old topic that Genx posted that used the following script but i would like to have it so once it is saved it will continue and email the custom named .pdf file to a certain email address without having to do it manually. the below script is what i have so far and it works great for saving a pdf file of the playlist i have with the title of the playlist as the name of the pdf file. Go to Related Record [ From table: “Playlist_Manager”; Using layout: “Print_Playlist” (Playlist_Manager) ] [ Show only related records ] Set Variable [ $Path; Value:"filewin:/C:/Documents and Settings/Mark Johnson/Desktop/Life Church/" ] Set Variable [ $Filename; Value:Playlist_Manager::Playlist_Title & ".pdf" ] Set Variable [ $FullPath; Value:$Path & $Filename ] Save Records as PDF [ File Name: “$FullPath”; Current record ]
bcooney Posted August 26, 2008 Posted August 26, 2008 Add Send Mail[To: "[email protected]"; "$FullPath"]
Mark Johnson Posted August 26, 2008 Author Posted August 26, 2008 Ok I put the above script you specified and i got the email but it didn't attach the pdf file that it saved before hand all in the same script. I just got an email with the subject and message body i put in the send email function. No attachement. below is the code i have now. Go to Related Record [ Show only related records; From table: “Playlist_Manager”; Using layout: “Print_Playlist” (Playlist_Manager) ] Set Variable [ $Path; Value:"filewin:/C:/Documents and Settings/UserName/Desktop/Life Church/" ] Set Variable [ $Filename; Value:Playlist_Manager::Playlist_Title & ".pdf" ] Set Variable [ $FullPath; Value:$Path & $Filename ] Save Records as PDF [ File Name: “$FullPath”; Current record ] Send Mail [ No dialog; To: "[email protected]"; Subject: "This is the Playlist for " & Playlist_Manager::Playlist_Title & " " & "on" & " " & Playlist_Manager::Playlist_Date; Message: "Attached is the Playlist for " & Playlist_Manager::Playlist_Title & " " & "on" & " " & Playlist_Manager::Playlist_Date; Attachment: “file:&FullPath” ] Show Custom Dialog [ Title: "Email Sent"; Message: "The Playlist attached has been sent successfully"; Buttons: “OK” ]
bcooney Posted August 26, 2008 Posted August 26, 2008 In the Send Mail attachment specify file, all you need is $FullPath.
Mark Johnson Posted August 26, 2008 Author Posted August 26, 2008 Yea i did put $FullPath as the text in the dialogue box when you click specify next to Attach in the send email function but its not being attached and emailed to me with the attachment when i try it. It just sends me an email and no attachment. Not sure why.
bcooney Posted August 27, 2008 Posted August 27, 2008 Playlist_Manager::Playlis t_Date; Attachment: “file:&FullPath” ] I see two things that are incorrect: 1. You don't need file: because it's already in $FullPath. 2. What is the & before FullPath. It should be $FullPath. Is this exactly what you have?
Mark Johnson Posted August 28, 2008 Author Posted August 28, 2008 Ok I didn't notice the & sign but its been changed to a dollar sign now and i took file: off and it all works now. Thanks for the help.
Recommended Posts
This topic is 5991 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now