Click here to Skip to main content
15,892,537 members
Home / Discussions / COM
   

COM

 
AnswerRe: Adding Controls Pin
Robilltuan12-Apr-06 16:43
Robilltuan12-Apr-06 16:43 
QuestionControls Pin
rahultaing11-Apr-06 14:34
rahultaing11-Apr-06 14:34 
QuestionOffice COM Addin -- SOS need help!!!! Pin
Alex Hoffenreich11-Apr-06 4:58
Alex Hoffenreich11-Apr-06 4:58 
Questionproblem with Derived class in WMI Pin
abhiramsss10-Apr-06 18:51
abhiramsss10-Apr-06 18:51 
QuestionActiveX control in console application Pin
Phil Harding10-Apr-06 0:51
Phil Harding10-Apr-06 0:51 
AnswerRe: ActiveX control in console application Pin
Jörgen Sigvardsson10-Apr-06 3:27
Jörgen Sigvardsson10-Apr-06 3:27 
QuestionHow to add a my own shortcut item to the outlook shortcutbar with VC Pin
lxwsh9-Apr-06 22:56
lxwsh9-Apr-06 22:56 
AnswerRe: How to add a my own shortcut item to the outlook shortcutbar with VC Pin
Ganesh_T14-Apr-06 23:29
Ganesh_T14-Apr-06 23:29 
I have created teh addin for Outlook 2003 and this is the sample code for . It may contain code which is not required


CComPtr<outlook::_application>olApp;
CComPtr<outlook::_explorer> spExplorer;
CComPtr<outlook::panes> panes;
IDispatch *scBarItem;
scBarItem=NULL;
//assign with application handle
olApp=m_Application;
olApp->ActiveExplorer(&spExplorer);
spExplorer->get_Panes(&panes);

panes->Item(CComVariant("OutlookBar"),&scBarItem);

if (scBarItem==NULL)
return S_OK;

CComQIPtr<outlook::_outlookbarpane>olBarPane(scBarItem);
CComQIPtr<outlook::outlookbarstorage>olbar;
CComPtr<outlook::_outlookbargroups>groups,groups1,groups2;
CComPtr<outlook::outlookbargroup>group,Item,todaysWorkBtn,othergroup;
CComPtr<outlook::_outlookbarshortcuts>shortcuts;
CComPtr<outlook::outlookbarshortcut>shortcut;
CComPtr<outlook::mapifolder>MFolder;
// CComPtr<outlook::_namespace>session;
olBarPane->put_Visible(true);
BSTR grName,todayName, otherName; //long count;
olBarPane->get_Contents(&olbar);


wchar_t Name[]=L"Test";
grName=SysAllocString(Name);
olbar->get_Groups(&groups);
//group=NULL;

long n;
groups->get_Count(&n);

BSTR temp1;
HRESULT hr123;
//for(int m=1;m<=n;m++){
hr123=groups->Item(CComVariant(1),&group);
if(hr123 == S_OK && group)
hr123= group->get_Name(&temp1);
//}

HRESULT hr=groups->Item(CComVariant(L"Test"),&group);


if(group==NULL)
{
CComQIPtr<outlook::_namespace> mysession;
CComPtr<outlook::mapifolder> InboxFolder;
BSTR sName;
CComPtr<outlook::_folders> Folders;
CComPtr<outlook::_folders> spFolders;
CComPtr<outlook::mapifolderptr> spNewFolder;

groups->Add( grName,CComVariant(1),&group);
group->get_Shortcuts(&shortcuts);

m_Application->ActiveExplorer(&m_Explorer);
m_Explorer->get_Session(&mysession);
mysession->GetDefaultFolder(olFolderInbox,&InboxFolder);
sName=_com_util::ConvertStringToBSTR("Inbox");
shortcuts->Add(CComVariant(InboxFolder),sName,CComVariant(1),&shortcut);

}

Cheers
"Peace of mind through Technology"
Questionerror D8045 Pin
rahultaing9-Apr-06 21:27
rahultaing9-Apr-06 21:27 
AnswerRe: error D8045 Pin
khan++9-Apr-06 21:34
khan++9-Apr-06 21:34 
QuestionIHTMLSelectElement onchange event Pin
abhishekks9-Apr-06 21:16
abhishekks9-Apr-06 21:16 
Questionwhy can not get the variable value correctly Pin
brygid9-Apr-06 20:27
brygid9-Apr-06 20:27 
QuestionC# project as a Client to COM component Pin
rahultaing9-Apr-06 15:28
rahultaing9-Apr-06 15:28 
AnswerRe: C# project as a Client to COM component Pin
Lim Bio Liong9-Apr-06 22:24
Lim Bio Liong9-Apr-06 22:24 
QuestionHow are COM objects instantiated? Pin
Richard Andrew x649-Apr-06 12:45
professionalRichard Andrew x649-Apr-06 12:45 
AnswerRe: How are COM objects instantiated? Pin
Michael Dunn9-Apr-06 18:39
sitebuilderMichael Dunn9-Apr-06 18:39 
Questionerror: LNK2001 Pin
rahultaing9-Apr-06 10:49
rahultaing9-Apr-06 10:49 
AnswerRe: error: LNK2001 Pin
Richard Andrew x649-Apr-06 12:39
professionalRichard Andrew x649-Apr-06 12:39 
AnswerRe: error: LNK2001 Pin
Richard Andrew x649-Apr-06 13:15
professionalRichard Andrew x649-Apr-06 13:15 
GeneralRe: error: LNK2001 Pin
rahultaing9-Apr-06 13:21
rahultaing9-Apr-06 13:21 
GeneralRe: error: LNK2001 Pin
Richard Andrew x649-Apr-06 13:27
professionalRichard Andrew x649-Apr-06 13:27 
GeneralRe: error: LNK2001 Pin
rahultaing9-Apr-06 13:34
rahultaing9-Apr-06 13:34 
GeneralRe: error: LNK2001 Pin
Richard Andrew x649-Apr-06 13:36
professionalRichard Andrew x649-Apr-06 13:36 
GeneralRe: error: LNK2001 Pin
Richard Andrew x649-Apr-06 13:33
professionalRichard Andrew x649-Apr-06 13:33 
GeneralRe: error: LNK2001 Pin
rahultaing9-Apr-06 13:37
rahultaing9-Apr-06 13:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.