January 31, 200224 yr Hi all, I have an email button in my contacts file that opens Outlook with an applescript and enters contact information in the email: tell application "FileMaker Pro" set strURL to cell "email" of current record set strFNAME to cell "First" of current record set strLNAME to cell "Last" of current record set strMAILTO to {strFNAME & " " & strLNAME & "<" & strURL & ">"} end tell tell application "Outlook Express" activate set theMSG to make new draft window with properties {to recipients:strMAILTO} end tell It also enters a date and some other information in a log in the same file. This all works fine. We also have a related Company file with a portal to the contact file that lists all the individual contacts. Today I tried to place a button in the (Contacts) portal row of the Company file that would run the email script as an external script but I keep getting the "Object not found, Error -1728" message. Here is that script: Go to related Record [Match company to CONTACT file] Perform Script [Filename: "Contactcs.fp5" (*), "Send Email"] Go to Layout [Original Layout] The other steps in the script worked fine (the ones that enter the information in the log). As a test, I tried linking the new email button in the Company file to other scripts in the contact file and they worked OK. It just won't do the email thing. Am I missing something (obviously!). Any help would be appreciated. Thank you. Deborah
February 1, 200224 yr In what file does the information your loading into the variables in the AppleScript exist? The fields must be in the active (frontmost) file in the syntax you had written. If that is not the case, then ther -1728 error could be generated. Why aren't you using the built-in Send Mail ScriptMaker step? Old Advance Man
February 1, 200224 yr Author Hmmmm, Well, I'm pretty inexperienced at FileMaker and Applescript. I used the Applescript after asking for a script that would open a new Outlook Express email. I was directed (I think on the FileMaker newsgroup) to an Applescript page. I had originally hoped I could do it from FileMaker.... I thought that by having my first script step take me to the file in question (Go to related Record [Match company to CONTACT file]), this would take care of the reference issue (being the active file). If I'm wrong about this, I hope someone can suggest a way to make this work. Thanks.
February 1, 200224 yr FMP 5.5 supports numerous email clients. AppleScript probably not needed. Look at the Send Mail ScriptMAker step. Old Advance Man
February 1, 200224 yr Author Well, we have 5.0. Not sure when we will upgrade - not my decision...in the meantime, can anyone see any reason why my script isn't working? Thank you. Deborah
Create an account or sign in to comment