Я пытаюсь открыть, изменить и сохранить презентацию, но она всегда открывается только для чтения:
If measTypesDict.Exists(MeasType) = False Then
Dim targetPath As String
Dim newPres As PowerPoint.presentation
measTypesDict.Add MeasType, New Dictionary
Set newPres = PowerPoint.Application.Presentations.Add(msoFalse)
targetPath = rootDir & "\final\" & MeasType & ".ppt"
newPres.SaveAs targetPath
' newPres.Close that is what's been missing
targetPresentationsDict.Add MeasType, Presentations.Open(targetPath, ReadOnly:=msoFalse, WithWindow:=msoFalse)
End If
The ReadOnly parameter is used to open a presentation as Read-Only.
The following example opens a file named test.ppt as Read-Only.
Sub OpenPresentationReadOnly()
Presentations.Open "c:\test.ppt", msoTrue
End Sub
Может ли кто-нибудь дать мне подсказку, почему это так? Я являюсь владельцем целевой папки и имею полный контроль в соответствии с настройками папки.
Read Only
? - person Siddharth Rout   schedule 20.12.2013Presentations.Add(msoFalse)' and then saved is as
newPres.SaveAs targetPath. **Now** I call
newPres.Close`, и снова открывал эту презентацию. Теперь у меня есть доступ на запись - но мне не очень нравится тот факт, что мне приходится его заново открывать.. - person Stefan Falk   schedule 20.12.2013targetPresentationsDict.Add MeasType,newPres
- person Siddharth Rout   schedule 20.12.2013