Export each Event in Calendar to vcs Files RRS feed

  • Question

  • Hi,

    I try to export all event of Outlook Calendars, to one VCS file's per Event.

    After search  i did this script:

    $ol=New-Object -comobject Outlook.Application
    $cal=$ns.Folders.Item(1).Folders|?{$ -eq 'Laurent'}
    $cal.items | %{$_.SaveAs("c:\$($_.Subject).vcs",7)}

    But function SaveAs doesn't work, i received this error message:

    Exception calling "SaveAs" with "2" argument(s): "Opération abandonnée (Exception from HRESULT: 0x80004004 (E_ABORT))"
    At line:4 char:32
    + $cal.items | %{$_.SaveAs("p:\$($_.Subject).vcs",7)}
    +                                ~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : ComMethodTargetInvocation

    If someone know how to solve this issue ? 


    • Moved by Bill_Stewart Friday, August 14, 2015 6:21 PM Move to more appropriate forum
    Wednesday, June 10, 2015 1:10 PM

All replies