Path: news.mathworks.com!not-for-mail
From: "Dan Haeg" <haegd@msoe.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Matlab.Application stopped working with 2008a
Date: Tue, 7 Oct 2008 16:50:03 +0000 (UTC)
Organization: Milwaukee School of Engineering
Lines: 28
Message-ID: <gcg3vr$56g$1@fred.mathworks.com>
References: <gbpa8j$sco$1@fred.mathworks.com>
Reply-To: "Dan Haeg" <haegd@msoe.edu>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1223398203 5328 172.30.248.35 (7 Oct 2008 16:50:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 7 Oct 2008 16:50:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 475291
Xref: news.mathworks.com comp.soft-sys.matlab:494105


"Dan Haeg" <haegd@msoe.edu> wrote in message <gbpa8j$sco$1@fred.mathworks.com>...
> I recently uninstalled an older version of Matlab(2007a I think) and now my macros don't work. I have been using 2008a for a while now but I didn't realize that my macros were still using the old version. I use macros in excel and outlook that use matlab as an automation server (Matlab.Application). My problem seems to be that the macro is still trying to use the old version of matlab that is no longer installed. The only ProgID that I can get to work is: Matlab.Desktop.Application which seems to stay running once the macro is done.
> 
> The below code shows the change that has to be made.
> I am using "Microsoft Visual Basic 6.5"
> 
> Dim Result As String
> Dim Matlab As Object
> 
> 'Set Matlab = CreateObject("Matlab.Application") used to work but now the below line needs to be used:
> Set Matlab = CreateObject("Matlab.Desktop.Application")
> 
> Result = Matlab.Execute("outlook")
> 
> 
> Does anyone know how I can get Visual Basic to work with my new matlab? Please let me know if I was unclear with anything.
> 
> Thanks,
> Dan
> 
> From the help:
> 
> The MATLAB ProgIDs are
>     *Matlab.Application &#8212; Starts a command window Automation server with the version of MATLAB that was most recently used as an Automation server (might not be the latest installed version of MATLAB).
>     *Matlab.Autoserver &#8212; Starts a command window Automation server using the most recent version of MATLAB.
>     *Matlab.Desktop.Application &#8212; Starts the full desktop MATLAB as an Automation server using the most recent version of MATLAB.

Can anyone help me?