August 22, 200817 yr 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 ]
August 26, 200817 yr Author 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” ]
August 26, 200817 yr Author 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.
August 27, 200817 yr 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?
August 28, 200817 yr Author 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.
Create an account or sign in to comment