You're right. But, before I open the temporary presentation the FullName
property have a valid value. And yes, I'm sure, I close the correct
presentation, because I call close method on the presentation object
returned by Open method, so it should be ok.
Thanks, Calin
If you are certain that there is nothing wrong with your implementation then
you will need to resolve this yourself or else post your code here like
Austin suggested and we can take a look.

Signature
Regards,
Shyam Pillai
Animation Carbon
http://www.animationcarbon.com
> You're right. But, before I open the temporary presentation the FullName
> property have a valid value. And yes, I'm sure, I close the correct
[quoted text clipped - 21 lines]
>>>
>>> Thanks, Calin
Calin - 29 Nov 2006 16:03 GMT
Thanks.
Unfortunatelly the code is written in C++ and it is difficult to post the
entire project here. But here is the PresentationSave (dispid 2005) event
handler :
STDMETHODIMP CPPTSink::OnPresentationSave(IDispatch *pPresentation)
{
OutputDebugString("OnPresentationSave\n");
CComQIPtr<_Presentation> ptrPresentation(pPresentation);
if(!ptrPresentation)
return E_POINTER;
// Get the FullName property value
CComBSTR bstrFullName = ptrPresentation->FullName.copy(); // here I get
the right value
_Application *pApplication = NULL;
try
{
// get the _Application interface pointer from GIT
HRESULT hr = m_pGIT->GetInterfaceFromGlobal(m_dwApplication,
__uuidof(_Application), (void**)&pApplication);
if(FAILED(hr) || NULL == pApplication)
return hr;
// Open temporary, invisible, presentation
CComPtr<_Presentation> ptrTempPresentation =
pApplication->Presentations->Open(_bstr_t(_T("c:\\test.ppt")), msoFalse,
msoFalse, msoTrue);
if(ptrTempPresentation)
{
// Get the FullName property value
bstrFullName = ptrPresentation->FullName.copy(); // here I still
get the right value
// Close temporary presentation
ptrTempPresentation->Close();
}
// Get the FullName property value
bstrFullName = ptrPresentation->FullName.copy(); // here I get a
wrong value like "Presentation1"
// Release _Application interface
pApplication->Release();
pApplication = NULL;
}
catch(_com_error &e)
{
OutputDebugString(e.ErrorMessage());
HRESULT hr = e.Error();
}
catch(...)
{
OutputDebugString("C++ exception in CPPTSink::ConnectSink");
}
}
best regards, Calin
> If you are certain that there is nothing wrong with your implementation
> then you will need to resolve this yourself or else post your code here
[quoted text clipped - 25 lines]
>>>>
>>>> Thanks, Calin
Shyam Pillai - 29 Nov 2006 17:01 GMT
I cannot reproduce the behavior in a VB port of your C++ code. I shall try
out the C++ code later today.

Signature
Regards,
Shyam Pillai
Animation Carbon
http://www.AnimationCarbon.com
> Thanks.
> Unfortunatelly the code is written in C++ and it is difficult to post the
[quoted text clipped - 87 lines]
>>>>>
>>>>> Thanks, Calin
Bill Dilworth - 30 Nov 2006 05:07 GMT
I don't speak C++, but it looks for all the world like you are trying to get
the full name off of the presentation you just closed. I'd guess you need
to either reset your object to the current presentation or get the full name
before you close it.

Signature
Bill Dilworth
A proud member of the Microsoft PPT MVP Team
Users helping fellow users.
http://billdilworth.mvps.org
-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
vestprog2@ Please read the PowerPoint FAQ pages.
yahoo. They answer most of our questions.
com www.pptfaq.com
.
>I cannot reproduce the behavior in a VB port of your C++ code. I shall try
>out the C++ code later today.
[quoted text clipped - 90 lines]
>>>>>>
>>>>>> Thanks, Calin
Shyam Pillai - 30 Nov 2006 15:23 GMT
Not quite. ptrTempPresentation and ptrPresentation are two different
presentations. He is closing ptrTempPresentation and not ptrPresentation.

Signature
Regards,
Shyam Pillai
Animation Carbon
http://www.AnimationCarbon.com
>I don't speak C++, but it looks for all the world like you are trying to
>get the full name off of the presentation you just closed. I'd guess you
[quoted text clipped - 95 lines]
>>>>>>>
>>>>>>> Thanks, Calin
Calin - 30 Nov 2006 21:47 GMT
You're right.
regards, Calin
> Not quite. ptrTempPresentation and ptrPresentation are two different
> presentations. He is closing ptrTempPresentation and not ptrPresentation.
[quoted text clipped - 98 lines]
>>>>>>>>
>>>>>>>> Thanks, Calin
Calin - 30 Nov 2006 21:47 GMT
No.
I call Close method on the interface pointer (object reference) returned by
Open method, which belongs to the temporary presentation.
regards, Calin
>I don't speak C++, but it looks for all the world like you are trying to
>get the full name off of the presentation you just closed. I'd guess you
[quoted text clipped - 95 lines]
>>>>>>>
>>>>>>> Thanks, Calin
Calin - 30 Nov 2006 21:44 GMT
Thanks.
>I cannot reproduce the behavior in a VB port of your C++ code. I shall try
>out the C++ code later today.
[quoted text clipped - 90 lines]
>>>>>>
>>>>>> Thanks, Calin