Fix PowerPoint's Presentation.SaveCopyAs method when saving to local OneDrive folder
Presentation.SaveCopyAs fails when trying to save to the local OneDrive folder. Steps to reproduce (tested with 16.0.11001 and 16.0.10730):
VBA:
ActivePresentation.SaveCopyAs Environ("userprofile") & "\OneDrive\OneDriveSaveCopyAsTest.pptx"
This does not give an error, but does not save the copy.
C#:
ActivePresentation.SaveCopyAs(Environment.ExpandEnvironmentVariables(@"%userprofile%\OneDrive\OneDriveSaveCopyAsTest.pptx"));
This throws a COMException with HRESULT 0x80CD1001.

1 comment
-
Roman Bursik commented
This is still valid issue one year since, running the latest Office 365 ProPlus 64bit. Also custom user add-ins or 3rd party addins that would benefit from this functionality don't work as result.