There was a problem sending the command to the program

Add-in Express™ Support Service
That's what is more important than anything else

There was a problem sending the command to the program
When Add-In is installed I'm getting "There was a problem sending the command to the program" error. 
Maciej Chojnacki




Posts: 15
Joined: 2010-10-05
Hello,
I've created Add-In for Excel 2007 and 2010 using your tool.
I've noticed strange behavior only when Add-In is installed.

I got this error while opening file in two ways only:
1.When Excel is pinned to the start menu; From Start/Excel, choose a file from Recent menu
2.When I click directly on a file.

Error message is: "There was a problem sending the command to the program"

I did some preeliminary research on that and found a tip to uncheck this : "Ignore other applications that use Dynamic Data Exchange (DDE)" .

However, error appears only when Add-In is installed. When I uninstall Add-In error is also gone.

My current client configuration is: Win7 Ultimate 64-bit, Office 2010 Pro 32-bit

Do you have any ideas what may cause that?

Thanks,
Maciej Chojnacki
Posted 30 Nov, 2010 10:01:21 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Hi Maciej,

Try moving all initialization code (including setting intial values) to the AddinStartupComplete event. Does this help?


Andrei Smolin
Add-in Express Team Leader
Posted 30 Nov, 2010 10:08:18 Top
Maciej Chojnacki




Posts: 15
Joined: 2010-10-05
Hi Andrei,

Thanks for reply, as you suggested I moved all code to AddinStartupComplete.
Right now my Init looks like this:

public ExcelAddIn()
        {
            InitializeComponent();
            this.AddinInitialize += new AddinExpress.MSO.ADXEvents_EventHandler(ExcelAddIn_AddinInitialize);
            this.AddinStartupComplete += new AddinExpress.MSO.ADXEvents_EventHandler(ExcelAddIn_AddinStartupComplete);   
        }


In ExcelAddIn_AddinInitialize I'm updating AddIn Labels with some text, in AddinStartupComplete I'm creating event handlers. This is all what I keep in Init and Startup.

I've noticed that error is still appearing. Do you know what else may cause that?


Thanks,
Maciej Chojnacki
Posted 01 Dec, 2010 10:07:20 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Hi Maciej,

Try moving all initialization code to AddinStartupComplete; pay attention to http://www.add-in-express.com/forum/read.php?FID=5&TID=6718&MID=33911#message33911.


Andrei Smolin
Add-in Express Team Leader
Posted 01 Dec, 2010 11:11:04 Top
Eugene Astafiev


Guest


Hi Maciej,

Are you able to reproduce the issue with a newly created add-in project?

BTW Could you please specify the build number of Add-in Express?
Posted 01 Dec, 2010 11:11:22 Top
Maciej Chojnacki




Posts: 15
Joined: 2010-10-05
Hello Eugene,

I'm using version: 6.2.3051. I did not try to create new project yet. I will do that soon.

Right now like I said I have nothing in my init code except InitializeComponent(which is autogenerated by Designer and I guess it's not the point to remove that) and AddinStartupComplete event handler.

Strange thing is that I'm getting this error also after removing Add-In which would state that it's not connected with Add-In. BUT on my test machines I have no issues before AddIn installed. It starts appearing right after.
Also it's not connected to a file as event emptyy file gives that error.
Posted 06 Dec, 2010 04:56:15 Top
Eugene Astafiev


Guest


Hi Maciej,

Note, we released a new build of http://www.add-in-express.com/downloads/adxnet.php with some minor bug fixes. Please let me know whether a new project and the latest build of Add-in Express work for you.
Posted 06 Dec, 2010 05:04:49 Top
Maciej Chojnacki




Posts: 15
Joined: 2010-10-05
Hello Eugene,

I think I solved it and I must appologize as it's not connected with your Add-In.

In my app (not addin) I was opening Excel Application in background and during init I set this property: IgnoreRemoteRequests to true.
This was causing the issue.

However I feel not 100% guilty as I'm not sure if this Property should be applied to Excel globally even after I quit from my initialized Excel object.

As a solution I'm just rolling back that value to false right before Excel.Quit().

Thanks again for you help and really sorry for bugging you.
Posted 06 Dec, 2010 05:44:15 Top
Eugene Astafiev


Guest


You are welcome, Maciej!

Thank you for letting me know.
Posted 06 Dec, 2010 05:55:15 Top