Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.excel,microsoft.public.vstudio.extensibility
external usenet poster
 
Posts: 3
Default How to Get Reference of CommandBar in Excel?

hi!

i am using VC7 and Office 2003. I want to add a toolbar in EXCEL with some
buttons. i have done that for word already. First i get the reference of the
CommandBar using the following code.

HRESULT hr;

CComPtr<Office2003::_CommandBars spCmdBars;

//QI() for application.

CComQIPtr<MSWord::_Application spWordApp(m_pApplication);

ATLASSERT(spWordApp);

m_pWordApp = spWordApp;

hr = m_pWordApp-get_CommandBars(&spCmdBars);

so now when i try to do the same with Excel i receive an error message that
get_CommandBars is not member of m_pExcelApp.

i don't know how to do that.

so if any body knows about that then please help me. i m in hurry.

Thanks.

Ahmad Jalil Qarshi


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2002 - Commandbar.protection = msoBarNoCustomize Jeff[_44_] Excel Programming 3 December 22nd 04 09:50 PM
CommandBar code does NOT work if Excel is Already Open :( sbriscoe Excel Programming 5 July 30th 04 03:33 AM
Identifying commandbar names in non-English versions of Excel Daniel Klann Excel Programming 12 January 4th 04 07:02 PM
commandbar Greg Prost[_2_] Excel Programming 2 November 21st 03 11:42 AM
Add control to commandbar Dan[_20_] Excel Programming 2 August 27th 03 04:47 PM


All times are GMT +1. The time now is 08:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"