Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!o4g2000pra.googlegroups.com!not-for-mail
From: gokikamukow <gokikamukow@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Matlab.Application stopped working with 2008a
Date: Thu, 23 Oct 2008 17:10:01 -0700 (PDT)
Organization: http://groups.google.com
Lines: 48
Message-ID: <950f2b10-2ecb-41d3-944a-77095daa35e1@o4g2000pra.googlegroups.com>
References: <gbpa8j$sco$1@fred.mathworks.com> <gcg3vr$56g$1@fred.mathworks.com>
NNTP-Posting-Host: 203.19.234.10
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1224807002 3243 127.0.0.1 (24 Oct 2008 00:10:02 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 24 Oct 2008 00:10:02 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: o4g2000pra.googlegroups.com; posting-host=203.19.234.10; 
	posting-account=hI_AhwoAAAAc0X9SpzAvLbeWpbEykHLA
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) 
	Gecko/2008092417 Firefox/3.0.3,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 SydneyProxyFarm:3128 (squid/2.5.STABLE14)
Bytes: 3314
Xref: news.mathworks.com comp.soft-sys.matlab:496991


On Oct 8, 3:50=A0am, "Dan Haeg" <ha...@msoe.edu> wrote:
> "Dan Haeg" <ha...@msoe.edu> wrote in message <gbpa8j$sc...@fred.mathworks=
.com>...
> > I recently uninstalled an older version of Matlab(2007a I think) and no=
w 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.Applicati=
on). My problem seems to be that the macro is still trying to use the old v=
ersion of matlab that is no longer installed. The only ProgID that I can ge=
t to work is: Matlab.Desktop.Application which seems to stay running once t=
he 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 =3D CreateObject("Matlab.Application") used to work but now=
 the below line needs to be used:
> > Set Matlab =3D CreateObject("Matlab.Desktop.Application")
>
> > Result =3D 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
> > =A0 =A0 *Matlab.Application &#8212; Starts a command window Automation =
server with the version of MATLAB that was most recently used as an Automat=
ion server (might not be the latest installed version of MATLAB).
> > =A0 =A0 *Matlab.Autoserver &#8212; Starts a command window Automation s=
erver using the most recent version of MATLAB.
> > =A0 =A0 *Matlab.Desktop.Application &#8212; Starts the full desktop MAT=
LAB as an Automation server using the most recent version of MATLAB.
>
> Can anyone help me?

I certainly can, please refer to:
http://www.mathworks.com/support/solutions/data/1-6FQK77.html

You need to run '!matlab \regserver' in a normal matlab application
before COM can create an automationserver