Jump to content
Sign in to follow this  
Chuck

Outlook

Recommended Posts

Is anyone here familiar with Outlook Express scripting? Specifically, I'm interested in creating a message with a recipient, subject and attachment, and Outlook isn't recordable to any great extent, and the dictionary is just about useless.

Thanks,

Chuck

Share this post


Link to post
Share on other sites

I hadn't seen that, but I did find a solution to the problem. In case anyone is interested, here is an AppleScript that takes a file called "untitled" (which is what PDFWriter calls the file when FileMaker Pro prints without a dialog) on the desktop (which is where PDFWriter places the file) and renames the file from a field in FileMaker and then sends an email to with the file enclosed. Perhaps it will help someone else to have it here as a reference. I just love what one can do with AppleScript!

Chuck

code:

-- Written by Charles E. Ross, chuck@rossclan.org, mer_dyn@yahoo.com

-- May 24, 2001

-- Version 1.0b1

-- This script gets the current invoice ID number from the projects database

-- in FileMaker and sets the untitled document on the desktop, which should

-- be a PDF file, to have the name of that invoice ID.

-- Limitations:

--

Share this post


Link to post
Share on other sites

Hey Chuck,

Thanks for the cool script. I have one question though. I have taken your script and added to a script I have in FMPro that goes through a found set of records and prints out pdf files of each of them. I have inserted you script inside the loop so that the FM script prints a record, then runs the AppleScript to rename the newly created file then moves onto the next record. The problem I have is that I can't get the script to recognize the project number of the record (your invoice ID). The script keeps naming the pdf file with the project number of the first file in the database even if it isn't in the current found set. I hope this makes sense. Any idea how to get your script to update with the next record?

P.S. I have also inserted a set field step in the FM script to set a global field to the project number of the current record. For some reason, though, the AppleScript is ignoring it. Thanks.

Share this post


Link to post
Share on other sites

Hey Chuck,

Thanks for the cool script. I have one question though. I have taken your script and added to a script I have in FMPro that goes through a found set of records and prints out pdf files of each of them. I have inserted you script inside the loop so that the FM script prints a record, then runs the AppleScript to rename the newly created file then moves onto the next record. The problem I have is that I can't get the script to recognize the project number of the record (your invoice ID). The script keeps naming the pdf file with the project number of the first file in the database even if it isn't in the current found set. I hope this makes sense. Any idea how to get your script to update with the next record?

P.S. I have also inserted a set field step in the FM script to set a global field to the project number of the current record. For some reason, though, the AppleScript is ignoring it. Thanks.

Share this post


Link to post
Share on other sites

In my script the field gCurrent_Invoice_ID is a global field. Before I run the AppleScript I use FileMaker's Set Field to set this field to the Invoice_ID field of the invoice I want to print. This field is the same for every record in the database, so it doesn't matter which record it gets the data from. Make sure that AppleScript references the global field and not the local record level field. Also try adding a clause "of current record" to the line that references the field, so that it would read:

set invoiceID to cell "gCurrent_Invoice_ID" of current record

Share this post


Link to post
Share on other sites

Chuck,

Thanks for the explanation. It doesn't seem to work though. Now I am getting an "object not found" error from FileMaker. Maybe I need to start over.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    cfmartinez1090 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.