4 Replies Latest reply on Jul 3, 2014 9:42 AM by erolst

    Export to Outlook Appointment

    hockman11

      I used the script recommended on forums but the date does not translate to the outlook appointment. What needs amended? Thanks in advanced.

       

      Set Field [Event::g_Data ; "BEGIN:VCALENDAR¶VERSION:2.0 ¶PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN¶BEGIN:VEVENT¶UID:¶DTSTAMP:" & Year(Event::start) & Month(Event::start) & Day(Event::start) & ¶ &"DTSTART:" & Year(Event::start) & Month(Event::start) & Day(Event::start) & ¶ & "DTEND:" & Year(Event::end) & Month(Event::end) & Day(Event::end) & ¶ & "SUMMARY:" & Event::Title & "¶END:VEVENT ¶END:VCALENDAR"]
      Set Variable [$path ; Get(TemporaryPath) & “event.ics”]
      Export Field Contents [Event::g_Data ; “$path” ; Automatically Open]

       

      This is the data returned:

      BEGIN:VCALENDAR

      VERSION:2.0

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

      BEGIN:VEVENT

      UID:

      DTSTAMP:2014711

      DTSTART:2014711

      DTEND:2014711

      SUMMARY:Lerch: Progress Monitoring Scholastic Reading

      END:VEVENT

      END:VCALENDAR

       

      2014-07-02_2156.png

        • 1. Re: Export to Outlook Appointment
          taylorsharpe

          Your DTSTAMP and DTSTART and DTEND all need to be in UTC timestamp formats (Date and Time) such as 20101206T180000Z  Otherwise it will not work. 

           

           

          Check out:  http://en.wikipedia.org/wiki/ISO_8601    Note that most programming languages drop the hyphens/colons from the ISO 8601 format and so does Outlook.  But otherwise it is basically what you have to do is put in the ISO 8601 format minus the field separates for dates/times.  Note that UTC time is Greenich Mean Time and not your local time. 

          • 2. Re: Export to Outlook Appointment
            mikebeargie

            And, if you're lazy like me, chances are you can find someone that's done a custom function for the conversion.

             

            Oh look:

            http://www.briandunning.com/cf/1161

             

            (select FM and Unix as your parameters)

            • 3. Re: Export to Outlook Appointment
              hockman11

              Thank you taylorsharpe.  I love this stuff.

              • 4. Re: Export to Outlook Appointment
                erolst

                hockman11 wrote:

                 

                Set Field [Event::g_Data ; "BEGIN:VCALENDAR¶VERSION:2.0 ¶PRODID:-//Microsoft Corporation//Outlook 12.0 MIMEDIR//EN¶BEGIN:VEVENT¶UID:¶DTSTAMP:" & Year(Event::start) & Month(Event::start) & Day(Event::start) & ¶ &"DTSTART:" & Year(Event::start) & Month(Event::start) & Day(Event::start) & ¶ & "DTEND:" & Year(Event::end) & Month(Event::end) & Day(Event::end) & ¶ & "SUMMARY:" & Event::Title & "¶END:VEVENT ¶END:VCALENDAR"]

                 

                And do yourself a favor and use List() and/or some other means of formatting the code; you'll be glad once you return to the script and the calculation; i.e.

                 

                Set Field [ Event::g_Data ;

                 

                Let ( [

                  dateStart = Year ( Event::start ) & Month ( Event::start ) & Day ( Event::start ) // well, however this needs to be formatted … only do it once!

                  dateEnd = Year ( Event::end ) & Month ( Event::end ) & Day ( Event::end) // ditto

                   ] ;

                  List (

                    "BEGIN:VCALENDAR" ;

                    "VERSION:2.0 "

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

                    "BEGIN:VEVENT" ;

                    "UID:" ;

                    "DTSTAMP:" & dateStart ;

                    "DTSTART:" & dateStart ;

                    "DTEND:" & dateEnd ;

                    "SUMMARY:" & Event::Title ;

                    "END:VEVENT " ;

                    "END:VCALENDAR"

                  )

                )

                 

                ]