|
Hi,
I wrote the MS Outlook Plugin,
but if multiple instances of MS Outlook 2000 are running,
then only first instance can load the plugin and other
instances can not load the plugin.
Thanks,
Sunil.
|
|
|
|
|
Hi Friends,
I wrote the MS Outlook plugin (ATL/COM dll) which just shows the button to toolbar.
The controls which are used by plugin, what should I take the control(button) Id.
Is it secure to take any Id, if that id already use by MS Outlook control? If not,
then how to choose/select the safe id.
Please, give me suggestion.
Thanks,
Sunil.
|
|
|
|
|
Hi friends,
I wrote the MS Outlook plugin (ATL/COM dll) which just shows the button to toolbar.
MS Outlook 2000 load the plugin and calls OnConnection methods of _IDTExtensibility2
but it doesn't call OnDisconnection methods when plugin is disconnected while
MS Outlook is closed. So, I can't free the resources while unloading the plugin.
Please, help me to solve this problem.
Thanks,
Sunil.
|
|
|
|
|
Hi friends,
I wrote the MS Outlook plugin (ATL/COM dll) which just shows the button to toolbar.
But when MS Outlook is run as administrator on windows vista,
it fails to load the plugin.
Please, help me to solve this problem.
Thanks,
Sunil.
|
|
|
|
|
According to MSDN, 3 means "load on startup" + "connected", 16 means "connect first time".
In my test, if I set it to 3, it works only the first time, "Load Behavior" setting is changed back to 2, you can find tons of discussions and fixes about this issue in internet. But the most strange thing is, when I changed "Load Behavior" to 16 as you suggested, it works fine. I cannot understand this. Is Microsoft wrong?
|
|
|
|
|
Hi ,
I have ran this application,Addin is registerd n can be seen in Tools->Options->Others->AdvancedOptions->....but the buttons created thru this appis not visible in OUTLOOK?
i am using Office 2003.
|
|
|
|
|
Hi,
I'm also getting the same problem for my toolbar,after some observation I found that if Outlook.EXE remains in task manager or u are opening Outlook UI second time then Toolbar is not visible for second UI.
|
|
|
|
|
This same thing is happened when i am working also. I am using the Office 2000. The second time of clicking the UI Outlook, the botton is not visible in tool bar and the Outlook.exe also remains in the task manager after quitting the outlook.
Regards,
Srinivasan
|
|
|
|
|
Is this an Add-in for Microsoft Outlook or Outlook Express. You have mentioned Outlook Express specifically in the lower half of your article. AFAIK Outlook Express cannot be extended. Is it a typo?
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
<marquee behavior="alternate" scrollamount="5" scrolldelay="50">
|
|
|
|
|
How to handle LButtonEvent?
|
|
|
|
|
Hi all,
Can anyone tell me how to add a menu item to File|New Item?? Suppose I am adding an item MyItem there,so, the the path of MyItem will be File|New|Myitem.
I have the corresponding code to do this in VB. And this is
Set Button = Application.ActiveExplorer.CommandBars("Menu Bar").Controls(1).Controls(1).Controls.Add(Type:=msoControlButton, Temporary:=True)
But I tried to convert this and failed. For convenience I've written the code here that I tried.
CComVariant vMenuBarTag("Menu Bar");<br />
spCmdBar = spCmdBars->GetItem(vMenuBarTag); <br />
ATLASSERT(spCmdBar);<br />
<br />
spCmdCtrls = spCmdBar->GetControls(); <br />
ATLASSERT(spCmdCtrls);<br />
<br />
CComVariant vFileMenuTag("File");<br />
spCmdCtrl= spCmdCtrls->GetItem(vFileMenuTag);<br />
ATLASSERT(spCmdCtrl);<br />
TRACE(spCmdCtrl->GetCaption());
<br />
CComQIPtr <Office::CommandBarPopup> ppFileMenuBar(spCmdCtrl); <br />
ATLASSERT(ppFileMenuBar);<br />
<br />
spCmdBarCtrls = ppFileMenuBar->GetControls();<br />
ATLASSERT(spCmdBarCtrls);<br />
CComVariant vNewMenuTag(1);
<br />
spCmdCtrl = spCmdCtrls->GetItem(vNewMenuTag);<br />
ATLASSERT(spCmdCtrl);<br />
TRACE(spCmdCtrl->GetCaption());
If I would get the Controls Collection for the File|New menu, i could add there buttons. But i can't find it right.
If anybody can provide me the help about this I will be very very greatfull to him.
Otherwise, I've convert whole project to VB.
Regards
Shihan
|
|
|
|
|
1) When you launch another Explorer, the customized button doesn't appear.
It's easy to understand why: the OnConnection event is fired just when Outlook exe starts, and consequently, that's not the good place to install the custom button.
To solve this bug, your add-In need to listen to the ExplorersEvents to get the NewExplorer event. Then, listen to the ExplorerEvents of this particular new Explorer, add catch the "Activate" Event => at this time, you can get the toolBars of the Explorer and add your button (only once per Explorer of course).
DispEventUnAdvise Explorer & button event on the Close Event of the Explorer.
(If anybody is interrested, I can send him the code).
2) A crash can occurs here:
spApp->ActiveExplorer(&spExplorer);
// get the CommandBars interface that represents Outlook's
// toolbars & menu items
HRESULT hr = spExplorer->get_CommandBars(&spCmdBars);
You can't assume that spExplorer is not NULL (i.e. at the connexion there is an active explorer).
This is not always true: when you start Outlook with Automation, there is no active explorer.
=> You need to test spExplorer before going further on.
|
|
|
|
|
First time opening the Outlook after registering DLL, OnConnection method is called So the button is added to the outlook tool bar. After closing and reopening the outlook the button is not visible because the OnConnection method is not called for second time. (I used LoadBehavior as Load at startup (i.e. '00000003'). I want to solve this problem what I have to do. I am eager to get your code.
Regards,
Srinivasan
|
|
|
|
|
Do you still need this code? If yes, I will have to dig into my PC to find it.
But I believe that you are maybe not releasing properly the resources, and maybe your add in is not unload.
Did you check on the process list that there is no instance of outlook running after you close it ?
Cheers,
Guillaume.
|
|
|
|
|
Hi i have the problem. That the position of my toolbar button is not saved. If i change the position of my addin toolbarbutton and restart outlook, the button is on the old position. Does anyone know how i can get the old position?? Thx
|
|
|
|
|
Hi Other than Debug modules, When I try to compile I am getting Linking Error in Release Modules
--------------------Configuration: MyAddin - Win32 Debug--------------------
Compiling resources...
Compiling...
Addin.cpp
Generating Code...
Compiling...
MyAddin.cpp
Generating Code...
Linking...
Performing registration
MyAddin.dll - 0 error(s), 0 warning(s)
--------------------Configuration: MyAddin - Win32 Unicode Debug--------------------
Compiling resources...
Compiling...
Addin.cpp
Generating Code...
Compiling...
MyAddin.cpp
Generating Code...
Linking...
Performing registration
MyAddin.dll - 0 error(s), 0 warning(s)
--------------------Configuration: MyAddin - Win32 Release MinSize--------------------
Compiling resources...
Compiling...
Addin.cpp
MyAddin.cpp
Generating Code...
Linking...
Creating library ReleaseMinSize/MyAddin.lib and object ReleaseMinSize/MyAddin.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseMinSize/MyAddin.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
MyAddin.dll - 2 error(s), 0 warning(s)
--------------------Configuration: MyAddin - Win32 Release MinDependency--------------------
Compiling resources...
Compiling...
Addin.cpp
MyAddin.cpp
Generating Code...
Linking...
Creating library ReleaseMinDependency/MyAddin.lib and object ReleaseMinDependency/MyAddin.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseMinDependency/MyAddin.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
MyAddin.dll - 2 error(s), 0 warning(s)
--------------------Configuration: MyAddin - Win32 Unicode Release MinSize--------------------
Compiling resources...
Compiling...
Addin.cpp
MyAddin.cpp
Generating Code...
Linking...
Creating library ReleaseUMinSize/MyAddin.lib and object ReleaseUMinSize/MyAddin.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseUMinSize/MyAddin.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
MyAddin.dll - 2 error(s), 0 warning(s)
--------------------Configuration: MyAddin - Win32 Unicode Release MinDependency--------------------
Linking...
Creating library ReleaseUMinDependency/MyAddin.lib and object ReleaseUMinDependency/MyAddin.exp
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
ReleaseUMinDependency/MyAddin.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
MyAddin.dll - 2 error(s), 0 warning(s)
How can I fix it??
|
|
|
|
|
MSDN's answer :
_ATL_MIN_CRT and Link Error "unresolved external symbol _main"
When you build a Release version of an ATL project, you can get the following link error:
LIBCMT.LIB(crt0.obj) : error LNK2001: unresolved external symbol _main
This error occurs if you are using CRT functions that require CRT startup code. The Release configuration defines _ATL_MIN_CRT, which excludes CRT startup code from your EXE or DLL.
To avoid this error, do one of the following:
Remove _ATL_MIN_CRT from the list of preprocessor defines to allow CRT startup code to be included. On the Project menu, click Settings. In the Settings For: drop down list, choose Multiple Configurations. In the Select project configuration(s) to modify dialog box that appears, click the check boxes for all Release versions, and then click OK. On the C/C++ tab, choose the General category. Remove _ATL_MIN_CRT from the Preprocessor definitions edit box.
If possible, remove calls to CRT functions that require CRT startup code. Instead, use their Win32 equivalents. For example, use lstrcmp instead of strcmp. Known functions that require CRT startup code are some of the string and floating point functions.
|
|
|
|
|
In my experimenting with Visual Studio 2005, in order to get any blank ATL dll to compile it is neccesary to disable exception handling as is documented in many places on msdn.
As you add to your addin you will discover other functions that are not compatable with _ATL_MIN_CRT. I have found that it is important to import "raw_interfaces_only" as in
#import "D:\Program Files\Microsoft Office\Office10\MSOUTL.olb" rename_namespace("Outlook"), named_guids, raw_interfaces_only using namespace Outlook;
which removes the ability to write something like this
spBarControls = spNewCmdBar->GetControls();
and rather use
spNewCmdBar->Get_Controls(&spNewCmdBar);
Another thing I found is that using variant_t like this was a problem
spCmdBars->Add(variant_t(L"NameOfBar"), vPos, vEmpty, vTemp,&spNewCmdBar);
but rather use
CComVariant vName("NameOfBar");<br />
spCmdBars->Add(name, vPos, vEmpty, vTemp,&spNewCmdBar);
I did alot of searching and testing until I came up with this Info hope it helps you out there.
|
|
|
|
|
My understanding at the moment is that one COM-add in dll could be used in all versions of Microsoft Outlook (Outlook 2000 / XP / 2003) ? Could somebody verify this idea to me . I guess this is how it goes, so you do not have to publish three or more different binaries of your COM add-in component.
Starting with COM addin's
|
|
|
|
|
This is incorrect. Each version requires a seperate dll.
|
|
|
|
|
Rubbish. Code using a class generated from the Outlook 2k typelib will work on O2k3. The reverse is also true. One build will work with O2k, O2k2 and O2k3. How do I know? I just tried it. Also IMO this is a really poor article with even worse sample code.
|
|
|
|
|
I download the sample, but the linker reports error:
"LIBCMT.lib (crt0.obj) : error LNK2001: unresolved external symbol _main
eleaseUMinDependency/MyAddin.dll : fatal error LNK1120: 1 unresolved externals"
I have not change any setting of the project, but why does it report this error? And how to resolve it?
|
|
|
|
|
I have the same link error, but nobody seems to be able to help us. Did you get an answer since June?
If so, could you help me?
excaliburger
|
|
|
|
|
Since I've wanted to write an outlook plugin, I find this tutorial very helpful. It was simple and clean (at least for me) and I've learned what I needed. I suggest you to overview it again, fix the images problem and use the default style as the other articles, so other readers will find it useful too. That way, I bet you can gain a higher rating for your great article.
Whoa! The internet is even on computers now!
|
|
|
|
|
Simply because people feel that this article is just rewrite version of article originally contributed by Amit Dey. At least make different so that people feel this is not a straight copy of people works.
Original article is
http://www.codeproject.com/com/outlookaddin.asp
|
|
|
|