Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / May 2007

Tip: Looking for answers? Try searching our database.

How do I show full path in title bar

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fellow Programmer - 06 May 2007 01:13 GMT
Hey, I would like to show the full path of the document in the ppt window's
title bar.  The macro method for Word and Excel does not work:

ActiveWindow.Caption = ActivePresentation.FullName

The caption field is read-only and cannot be set.  Does anyone have an idea
of how to accomplish this task?
houweipeng - 31 May 2007 04:31 GMT
>Hey, I would like to show the full path of the document in the ppt window's
>title bar.  The macro method for Word and Excel does not work:
[quoted text clipped - 3 lines]
>The caption field is read-only and cannot be set.  Does anyone have an idea
>of how to accomplish this task?

Please see the follow codes, I hope they will help u.

CComQIPtr<MSPowerpoint::_Presentation> spActivePresentation;
//...
//...Create Active Presentation Object
//...
CString cstrFullName = spActivePresentation->FullName().GetBSTR();
CComQIPtr<MSPowerpoint::DocumentWindows> spWins;
spWins = spActivePresentation->GetWindows();
long count = spDocWins->Count;
for(int i=1; i<=count ; i++)
{
  CComQIPtr<MSPowerpoint::DocumentWindow> spEnumWin;
  spWindow = spDocWins->Item(i);
//...
//...Do some checks
//...
    HWND hWnd = (HWND)spWindow->GetHWND();
  ::SetWindowText(hWnd,cstrFullName);
}

Signature

侯伟鹏

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.