Save Calendar item to iCal format
All,
I have not been able to find a good example on saving an Outlook Calendar item as iCal (ics) using vbscript from a form. Any idea on what the Const variable should be set to or is there an example you can share? Thanks in adavanced! Rafael |
Save Calendar item to iCal format
When in doubt, check the object browser: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. You'll be able to see the AppointmentItem.SaveAs method and the enumeration that determines the constants it supports. You can select any object or member, then press F1 to see its Help topic, which usually will include code examples.
-- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Rafael" wrote in message ... All, I have not been able to find a good example on saving an Outlook Calendar item as iCal (ics) using vbscript from a form. Any idea on what the Const variable should be set to or is there an example you can share? Thanks in adavanced! Rafael |
Save Calendar item to iCal format
Thanks Sue.
I had tried this already but the example I see there is for VBA only which I am not able to traslate to VBScript. The VBScript example only talks about saving to text. I know the const value is olICal for VBA but not sure what number that is for VBScript. "Sue Mosher [MVP-Outlook]" wrote: When in doubt, check the object browser: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. You'll be able to see the AppointmentItem.SaveAs method and the enumeration that determines the constants it supports. You can select any object or member, then press F1 to see its Help topic, which usually will include code examples. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Rafael" wrote in message ... All, I have not been able to find a good example on saving an Outlook Calendar item as iCal (ics) using vbscript from a form. Any idea on what the Const variable should be set to or is there an example you can share? Thanks in adavanced! Rafael |
Save Calendar item to iCal format
Same answer - look it up using the object browser and Help. You might as well learn how to do this now, because it's a basic skill for Outlook forms code writing that will save you from typing erros. Step-by-step:
1) Start Outlook VBA - Alt+F11 2) Bring up the object browser - F2. 3) Switch the library to Outlook. 4) Browse or search to locate and select the SaveAs method. 5) Press F1 to bring up the Help topic. 6) Read the information in the Help topic about the Type property. You should learn that all the type constants are members of the OlSaveAsType enumeration. 7) Return to the object browser and browse or search for OlSaveAsType. 8) Select the olICal constant. 9) Copy the Const statement from the bottom of the object browser and paste it into your code. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Rafael" wrote in message ... Thanks Sue. I had tried this already but the example I see there is for VBA only which I am not able to traslate to VBScript. The VBScript example only talks about saving to text. I know the const value is olICal for VBA but not sure what number that is for VBScript. "Sue Mosher [MVP-Outlook]" wrote: When in doubt, check the object browser: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. You'll be able to see the AppointmentItem.SaveAs method and the enumeration that determines the constants it supports. You can select any object or member, then press F1 to see its Help topic, which usually will include code examples. "Rafael" wrote in message ... All, I have not been able to find a good example on saving an Outlook Calendar item as iCal (ics) using vbscript from a form. Any idea on what the Const variable should be set to or is there an example you can share? Thanks in adavanced! Rafael |
Save Calendar item to iCal format
Ah Sue thanks for the step-by-step. That really did it. The answer is 8!
Thanks much once again! Rafael "Sue Mosher [MVP-Outlook]" wrote: Same answer - look it up using the object browser and Help. You might as well learn how to do this now, because it's a basic skill for Outlook forms code writing that will save you from typing erros. Step-by-step: 1) Start Outlook VBA - Alt+F11 2) Bring up the object browser - F2. 3) Switch the library to Outlook. 4) Browse or search to locate and select the SaveAs method. 5) Press F1 to bring up the Help topic. 6) Read the information in the Help topic about the Type property. You should learn that all the type constants are members of the OlSaveAsType enumeration. 7) Return to the object browser and browse or search for OlSaveAsType. 8) Select the olICal constant. 9) Copy the Const statement from the bottom of the object browser and paste it into your code. -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Rafael" wrote in message ... Thanks Sue. I had tried this already but the example I see there is for VBA only which I am not able to traslate to VBScript. The VBScript example only talks about saving to text. I know the const value is olICal for VBA but not sure what number that is for VBScript. "Sue Mosher [MVP-Outlook]" wrote: When in doubt, check the object browser: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from All Libraries to Outlook to browse all Outlook objects and their properties, methods, and events. You'll be able to see the AppointmentItem.SaveAs method and the enumeration that determines the constants it supports. You can select any object or member, then press F1 to see its Help topic, which usually will include code examples. "Rafael" wrote in message ... All, I have not been able to find a good example on saving an Outlook Calendar item as iCal (ics) using vbscript from a form. Any idea on what the Const variable should be set to or is there an example you can share? Thanks in adavanced! Rafael |
All times are GMT +1. The time now is 11:44 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com