4 Replies Latest reply on Oct 27, 2015 9:33 AM by hockman11

    I am trying to create a script to automate an outlook meeting.

    hockman11

      I have only some elements.  I want it to jump to send the attendees where the emails are populated by calc fields. here is what I have now.  This works fine for the user to add to their calendar but I want it to send to attendees instead.  Any help with the specific code is greatly appreciated.

       

      "BEGIN:VCALENDAR¶VERSION:2.0 ¶PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN¶BEGIN:VEVENT¶UID:¶DTSTAMP:" & Year(student_TASKS::Date_IEPScheduled) & Right("00"&Month(student_TASKS::Date_IEPScheduled);2) & Right("00"&Day(student_TASKS::Date_IEPScheduled);2)& ¶ &"DTSTART:" & Year(student_TASKS::Date_IEPScheduled) & Right("00"&Month(student_TASKS::Date_IEPScheduled);2) & Right("00"&Day(student_TASKS::Date_IEPScheduled);2) & ¶ & "DTEND:" & Year(student_TASKS::Date_IEPScheduled) & Right("00"&Month(student_TASKS::Date_IEPScheduled);2) &Right("00"& Day(student_TASKS::Date_IEPScheduled);2) & ¶ & "SUMMARY:" & student_TASKS::Event_Title & "¶END:VEVENT ¶END:VCALENDAR"

        • 1. Re: I am trying to create a script to automate an outlook meeting.
          erolst

          I think what you want is to put the result of this calculation into a field, save it under path as a file (using Export Field Contents), and specify the same file (path) as attachment for the Send Mail step?

           

          btw, you can simplify such a calculation (and make it much more legible) like so:

           

          Let ( [

            sd = student_TASKS::Date_IEPScheduled ;

            dateString = Year ( sd ) & Right ( "00" & Month ( sd ) ; 2 ) & Right ( "00" & Day ( sd ) ; 2 )

            ] ;

            List (

              "BEGIN:VCALENDAR" ;

              "VERSION:2.0 ";

              "PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN" ;

              "BEGIN:VEVENT" ;

              "UID:" ;

              "DTSTAMP:" & dateString ;

              "DTSTART:" & dateString ;

              "DTEND:" & dateString ;

              "SUMMARY:" & student_TASKS::Event_Title ;

              "END:VEVENT " ;

              "END:VCALENDAR"

            )

          )

          • 2. Re: I am trying to create a script to automate an outlook meeting.
            hockman11

            Thank you for the cleaner script language.  This works for me as an appointment.  I wanted to know the language to lead one to the meeting option instead of appointment in Outlook and auto populate the emails to the attendees as well.

             

            Capture.JPG

            • 3. Re: I am trying to create a script to automate an outlook meeting.
              wimdecorte

              You will probably need to write VBscript or PowerShell syntax to do that and talk to the Outlook API.  Google that and it should get  you a lot closer.

               

              VBscript and PowerShell are just text files so once you know the proper syntax it is easy to put them together from inside FM using FM data and then output them and run them from FM.

              • 4. Re: I am trying to create a script to automate an outlook meeting.
                hockman11

                Here is the syntax if anyone is interested.  This adds an outlook meeting with attendees, date, time and summary.

                 

                Let ( [

                  sd = your date field ;

                  dateString = Year ( sd ) & Right ( "00" & Month ( sd ) ; 2 ) & Right ( "00" & Day ( sd ) ; 2 )

                  ] ;

                  List (

                    "BEGIN:VCALENDAR";

                    "VERSION:2.0 ";

                    "PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN" ;

                    "BEGIN:VEVENT" ;

                    "UID:" &Get(UUID);

                    "DTSTAMP:" & Your variable ;

                "LOCATION:" & "your variable";

                    "ATTENDEE;mail to Your variable;

                    "DTSTART:" & Your variable;

                    "DTEND:" & Your variable;

                    "SUMMARY:" & your variable ;

                    "END:VEVENT ";

                    "END:VCALENDAR"

                  )

                )