Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2007

Tip: Looking for answers? Try searching our database.

Word 2003 VB IDE & VB2005

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CS Hayes - 09 Apr 2007 15:58 GMT
I've noticed some syntax difference.  What are the major differences between
Visual Basic in VB2005 and VB in Office 2003?
Signature

Chris Hayes
Still a beginner (only 12 years)

Jay Freedman - 09 Apr 2007 17:52 GMT
> I've noticed some syntax difference.  What are the major differences
> between Visual Basic in VB2005 and VB in Office 2003?

Just about everything.

VB2005 is VB.Net. It's an almost entirely new language based on the Common
Language Runtime and the .Net Framework.

The VBA (not really VB) in Office 2003 is based on VB 6.0, the one Microsoft
killed off when VB2005 was introduced.

Not only are there syntax differences, there are semantic differences, data
type differences, and general incompatibility.

That's the short answer. If you want the long answer, wait for Karl and
Jonathan to come along. <eg>

Signature

Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

CS Hayes - 09 Apr 2007 20:24 GMT
So, here's another question:

If I was interested in developing small solutions with Office products, what
side should I focus on?

Signature

Chris Hayes
Still a beginner (only 12 years)

> > I've noticed some syntax difference.  What are the major differences
> > between Visual Basic in VB2005 and VB in Office 2003?
[quoted text clipped - 12 lines]
> That's the short answer. If you want the long answer, wait for Karl and
> Jonathan to come along. <eg>
Jonathan West - 09 Apr 2007 20:42 GMT
> So, here's another question:
>
> If I was interested in developing small solutions with Office products,
> what
> side should I focus on?

I would recommend you stick to VBA unless you already have a substantial
VB.NET application to which you want to add some capability to automate
Office.

VBA is tightly integrated into the office apps. You can get much better
context-sensitive help for the office object models, and you can run the
macro recorder and get some sample code -a kind of "code-by-example". Of
course, you willusually need to refine the recorded code but even
experienced programmers sometimes find it useful to see what objects are
used for a particular purpose.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

old man - 09 Apr 2007 22:24 GMT
Hi,

I don't like disagreeing with a Word MVP but you may be doing the equivalent
of building a great horseshoe just when cars are being widely introduced.

Microsoft is very commited to .Net and VSTO and finally the development
environment for Word is as good as the one for Excel (the Word one was always
1-5 years behind). The Office Object model still reflects a long product
history (so it is rather unusual) but it is much better and if you want to
develop software for the long (sic) run use VSTO and .Net. Its much harder
for VBA programmers to get but it is truly object oriented and you get access
to the CLR and the .Net libraries.

This is a very emotional issue for users who have learned and pushed VBA to
places no one ever anticipated but VSTO is the way to go. I don't want to
start a flame war and I have the greatest respect for the VBA experts on this
site but that is the way it is.

old man

> > So, here's another question:
> >
[quoted text clipped - 12 lines]
> experienced programmers sometimes find it useful to see what objects are
> used for a particular purpose.
Perry - 10 Apr 2007 00:23 GMT
Hi CS Hayes,

Let me bring my 20-cents-worth to the table  :-)

Interesting topic.

Because of business dependency on legacy VB(A) applications/projects, MS
can't stop full support of that platform.
And there are a lot of VB(A) projects out there... ;-)
I agree.

But, old man, I think you're right. It is the way to go ...

Here come the 20 cents:

(VB2005, read VB2 005.NET and/or VSTO 2005 SE)

VB2005 vs VB6
I use VB6 only for support to legacy VB6 apps.
I've moved to VB2005 completely for new apps.

VB2005 vs MS Access VBA
MS Access is famous for RAD when it comes to database app development.
With VB2005 (and ADO.net), turn around times regarding delivery of database
app development are (or can be) equivalent.
The VB2005 IDE is ... ahem ... richer, though. (apart from the MS Access
Main/Subform functionality)
What do I favour? Sometimes MS Access, but more and more: VB2005.
Personally, I'd say: 70% VB2005 and 30% Access

VB2005 vs MS Excel VBA
The MS Excel legacy VBA power is humongeous. So no favour when it comes to
delivering Excel development projects.
VB2005 vs Excel: 50/50 with a slight favour to VB2005 because of the
richness of the windows forms in VB2005.
I'm waiting for the Office 2007 fully supported PIA's for Excel. This could
turn things around in favour of VB2005.

VB2005 and MS Word VBA
MS Word development in an enterprise setting: rapid document production
tooling.
There's practically no other (enterprise) interest to MS Word besides:
Getting my data as fast as possible into (presentable) enterprise documents
with the least of efforts.
Because of the hidden binary document specifications of MS Word (in all MS
Word versions prior to 2007), y'd always need
the MS Word application to create documents. So, programming MS Word using
an automation client or using MS Word VBA didn't make
any difference to me.
So before Office 2007, the VB2005 vs MS Word VBA would score: 50/50 as well.
With Office 2007 however and XML being the MS Word document foundation, this
will change.
If you know the internal directory build up of MS Word documents, and the
XML specifications of the dependant XML files to go with it, you can
create MS Word documents using ... notepad.
In case you didn't know: change the .docx or .docm file extensions of MS
Word 2007 documents into .zip and open this renamed file in Windows Explorer
and explore ...
This will change MS Word document production tremendously from a developer's
point of view, once expertise around this subject grows in the development
community.
Like with Excel, I'm waiting for the full Office 2007 interop wrappers to
come available.
Until then, the score for VB2005 vs MS Word 2007 would read: 50/50 but will
change in favour of VB2005.

Hope this was usefull to you
:-)

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

> Hi,
>
[quoted text clipped - 37 lines]
>> experienced programmers sometimes find it useful to see what objects are
>> used for a particular purpose.
CS Hayes - 10 Apr 2007 02:40 GMT
I've been feeling my way around this issue.  I really don't know what is
what.  What provoked this question was the fact that (out of curiousity) I
looked at what version of VB the Office Suite was using (via [help], [about].)
I'm trying a trial of Office 2007 and the VBA ide is VB 6.5
am I missing something here?  If MS is migrating to VB.NET then why the
release of 2007 with VB 6.5?
From what I understand (and it's not a lot) VB.NET or VS2005 are external
from Office and VB 6.5 is internal or attached directly to the individual
program (i.e. Word, Excel, Access etc.)  I also, apparently, grasp that it is
safe to learn VB 6.5 for Office as a tool for creating small solutions for
clients (is this true?)
Can I obtain literature (books, training) on using the VB 6.5 and progress
in that direction or is it an area that is not covered?  (I'm really not sure
what books to get, I just ordered "Visual Basic 2005 Step by Step" but that
wouldn't help if I was focusing on the VB 6.5)
Signature

Chris Hayes
Still a beginner (only 12 years)

> Hi CS Hayes,
>
[quoted text clipped - 114 lines]
> >> experienced programmers sometimes find it useful to see what objects are
> >> used for a particular purpose.
Karl E. Peterson - 10 Apr 2007 18:20 GMT
> I've been feeling my way around this issue.  I really don't know what is
> what.  What provoked this question was the fact that (out of curiousity) I
> looked at what version of VB the Office Suite was using (via [help], [about].)
> I'm trying a trial of Office 2007 and the VBA ide is VB 6.5
> am I missing something here?  If MS is migrating to VB.NET then why the
> release of 2007 with VB 6.5?

Because the Office division within Microsoft, unlike the Developer Tools division,
understands the peril it puts the company in if/when they abandon their customer
base.  For a good explanation of this, see:

Visual Studio Magazine - Guest Opinion - Office and .NET: Better Together?
http://www.fawcette.com/vsm/2002_08/magazine/departments/guestop/

The real problem with VB.NET is that it doesn't offer a migration path for those of
us who have used MSBasic for the first *quarter-century* of its existence.  What it
does is declare those decades of work to have been disposable.  While it's very true
that old code often benefits (greatly!) from rewrites, it simply *cannot* be a
decision relegated to the langauge vendor.  That's a decision only you, the
developer, can and should make.  This fundamental principle was cast aside in this
debacle.  (See my sig.)

> From what I understand (and it's not a lot) VB.NET or VS2005 are external
> from Office and VB 6.5 is internal or attached directly to the individual
> program (i.e. Word, Excel, Access etc.)  I also, apparently, grasp that it is
> safe to learn VB 6.5 for Office as a tool for creating small solutions for
> clients (is this true?)

True, on both accounts.  And the .5 there really refers to the IDE release, not the
language itself.  Very little, if anything, has changed in the language since the
6.0 release.

> Can I obtain literature (books, training) on using the VB 6.5 and progress
> in that direction or is it an area that is not covered?  (I'm really not sure
> what books to get, I just ordered "Visual Basic 2005 Step by Step" but that
> wouldn't help if I was focusing on the VB 6.5)

There's lots of them, yeah!  The most recent one I enjoyed was "Professional Excel
Development" (http://tinyurl.com/ys6g4t).  Here's a few dedicated to Word --  
http://tinyurl.com/2ykyxs -- wish I could recommend a specific one, but I'm not as
familiar with that bunch.  There are also scads of good websites -- like
http://word.mvps.org -- where you can find very well crafted example code and
explanations.

Have fun...   Karl
Signature

.NET: It's About Trust!
http://vfred.mvps.org

Perry - 10 Apr 2007 20:47 GMT
>> I'm trying a trial of Office 2007 and the VBA ide is VB 6.5
>> am I missing something here?
Nope, correctomundo

>> If MS is migrating to VB.NET then why the
>> release of 2007 with VB 6.5?
Only InfoPath 2007 ships with VB.net IDE.
I hope VB.net IDE will ship with SR1 or SR2 of Office 2007.
I've noticed some apprehension among VBA expert colleagues here in Holland.
I'm trying to convince them into investing in VB.net. My message is finally
getting through to
them but only after having showed them apps I developed and demonstrating
the richness of the IDE.

>> From what I understand (and it's not a lot) VB.NET or VS2005 are external
>> from Office and VB 6.5 is internal or attached directly to the individual
>> program (i.e. Word, Excel, Access etc.)
Strike!

>>I also, apparently, grasp that it is safe to learn VB 6.5 for Office
>>as a tool for creating small solutions for  clients (is this true?)
True.
But, think about:
Ok, as a beginner you would need to invest in VBA 6.5 all the same, right?
Why not use the effort to learn VB.net from scratch, I wonder?
As a beginner, it will take some effort (courses, courses and courses) but
if you have some affinity with programming
and your MS Word knowledge (I mean power user knowledge and not programming
knowledge) is good, why not skip the VBA 6.5 step
and jump right into VB.net?
How is your MS Word knowledge by the way?

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

> I've been feeling my way around this issue.  I really don't know what is
> what.  What provoked this question was the fact that (out of curiousity) I
[quoted text clipped - 160 lines]
>> >> are
>> >> used for a particular purpose.
CS Hayes - 10 Apr 2007 21:50 GMT
1) Thanks to Karl for the link to West's OpEd.  I didn't realize this was a
sore issue.

2) Thanks to Perry for your direction on VB.Net.  I have a somewhat good
grasp of office applications.  I've built some small applications (forms for
Word Documents) but that's about it.
Signature

Chris Hayes
Still a beginner (only 12 years)

Karl E. Peterson - 10 Apr 2007 21:55 GMT
> 1) Thanks to Karl for the link to West's OpEd.  I didn't realize this was a
> sore issue.

I'll say it again: See my sig...  Sore doesn't *begin* to address this one!
Signature

.NET: It's About Trust!
http://vfred.mvps.org

Perry - 10 Apr 2007 23:14 GMT
Hi CS Hayes,

You will have noticed the excitement taking course in the other thread.
I would like to apologize for that.
What a posting can harvest, hey?
;-)

Eventhough, Karl is right about his (side) comments and concerns regarding
the various
development platforms (I acknowledged this in one of my previous postings..)
I'll stick to my advise to also consider the new technologies.

That's what this newsgroup is for.
Supplying information, trying to be helpfull, eventhough this
won't meet personal comfort of others.

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

> 1) Thanks to Karl for the link to West's OpEd.  I didn't realize this was
> a
[quoted text clipped - 4 lines]
> for
> Word Documents) but that's about it.
Karl E. Peterson - 10 Apr 2007 21:52 GMT
> I hope VB.net IDE will ship with SR1 or SR2 of Office 2007.

What would lead you to such a hope?  I don't recall that sort of change *ever*
occuring in a service release.  And, I'm fairly certain, at least one more full
version of Office will ship before it happens anyway.

> I've noticed some apprehension among VBA expert colleagues here in Holland.

Wise folks.  Take heed.

> I'm trying to convince them into investing in VB.net. My message is finally
> getting through to
> them but only after having showed them apps I developed and demonstrating
> the richness of the IDE.

What folly!  Cliche as it may sound, "Just how old *are* you, anyway?"

What possible benefit do your *customers* derive from your rich and presumably
fulfilling experience?  That's the same lame reasoning that have led many
paid-by-the-kloc coders and other nocturnal aviators to recommend the platform --  
selfishness.  Nothing else can more adequately describe this argument.  Those who
actually *own* the applications you're writing would be well advised to take note of
your position.  You do them no favor, leading them on the blind path of betrayal for
your own personal comfort.
Signature

.NET: It's About Trust!
http://vfred.mvps.org

Perry - 10 Apr 2007 22:16 GMT
Let's start with
> You do them no favor, leading them on the blind path of betrayal for your
> own personal comfort.

Oops. What's yr problem?

> What folly!  Cliche as it may sound, "Just how old *are* you, anyway?"
43, I guess in yr eyes far too young or at least far younger than you are, I
take it ...

Well, then it's good that my customers do the judging on:
- my experience
- my apps (and they're taking it)

What's yr problem Karl ??
You a grumpy old man?

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

>> I hope VB.net IDE will ship with SR1 or SR2 of Office 2007.
>
[quoted text clipped - 23 lines]
> no favor, leading them on the blind path of betrayal for your own personal
> comfort.
Perry - 10 Apr 2007 22:21 GMT
And btw, I can't remember having responded to you.
Far all I know, I was politely responding to the OP, giving some
personal opinions without trying to ... hurt ... someone.
so it appears.

Cool down, have a beer (or a dozen) and relax!

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

> Let's start with
>> You do them no favor, leading them on the blind path of betrayal for your
[quoted text clipped - 49 lines]
>> no favor, leading them on the blind path of betrayal for your own
>> personal comfort.
Perry - 10 Apr 2007 22:38 GMT
Now in the wright thread (wanna be sure you read it in the correct sequence
... :-)

As to experience or age or what other relevant capabilities you'd like to
hear:
Unix, PASCAL, TURBO PASCAL, C, COBOL, FORTRAN, CLIPPER

That's my background.
There was no OO programming in those days ...
Guess I'm not *that* young after all, hey ... whatchasay?
(can't believe that I'm getting so excited here ...)

And considering the fact that I will support (and keep on supporting) my
customers on legacy
VB6 files, what's wrong with having a personal opinion that VB.NEt is a
state-of-the-art development platform????
What's wrong with you ...  :-)

--
Krgrds,
Perry

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

> And btw, I can't remember having responded to you.
> Far all I know, I was politely responding to the OP, giving some
[quoted text clipped - 64 lines]
>>> position.  You do them no favor, leading them on the blind path of
>>> betrayal for your own personal comfort.
Karl E. Peterson - 11 Apr 2007 17:14 GMT
> What's yr problem Karl ??
> You a grumpy old man?

Ouch! <g>  Stung ya where it hurts, eh?

Selfishness is never pretty, especially on self-reflection.
Signature

.NET: It's About Trust!
http://vfred.mvps.org

Perry - 11 Apr 2007 17:26 GMT
> Ouch! <g>  Stung ya where it hurts, eh?

Now, don't get too overconfident here :-))
just got a bit excited. nothing more, nothing less.
But that's ok :-)

Apparantly, you take pride in *trying* to hurt people ...
and I'm only here to help others and share opinions.

--
Kind regards,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

>> What's yr problem Karl ??
>> You a grumpy old man?
>
> Ouch! <g>  Stung ya where it hurts, eh?
>
> Selfishness is never pretty, especially on self-reflection.
Karl E. Peterson - 11 Apr 2007 19:05 GMT
>> Ouch! <g>  Stung ya where it hurts, eh?
>
> Now, don't get too overconfident here :-))
> just got a bit excited. nothing more, nothing less.
> But that's ok :-)

A good night's rest helps, sure.

> Apparantly, you take pride in *trying* to hurt people ...

Pride?  Hardly.  Your reaction was amusing, however.

> and I'm only here to help others and share opinions.

If by others, you mean Microsoft, you're on track.  Your advice/opinions had the
potential to hurt actual *real* people, though.  Selfishness is that way, by nature.
Signature

.NET: It's About Trust!
http://vfred.mvps.org

Perry - 11 Apr 2007 20:02 GMT
> Pride?  Hardly.  Your reaction was amusing, however.
Sorry, you certainly sounded that way. (re-read your replies...)
But as stated in my previous msg, that's ok.

> Selfishness.
Can you explain to me what selfnishness means to you, when I'm only
expressing
my opinion and note (re-read my first posting to OP...)
in which I've even acknowledged your concerns.
So what's selfnishness?

Let's look it at it from a different angle.
So you're good at doing an old trick, but someone presents a new one.
What's wrong with trying out the new one?
What's wrong with investigating progress? What's wrong with admitting that
the new trick
contains techniques you will have to learn. What's wrong with admitting that
you have to learn?
What is selfnishness?

Karl, actually I don't like discussions in newsgroups if it doesn't
contribute to
the benefit of others.
So, if you'd like to wrap this up, you can continue our (so it appears)
personal conversation
via email.

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

>>> Ouch! <g>  Stung ya where it hurts, eh?
>>
[quoted text clipped - 13 lines]
> had the potential to hurt actual *real* people, though.  Selfishness is
> that way, by nature.
Karl E. Peterson - 11 Apr 2007 20:18 GMT
>> Pride?  Hardly.  Your reaction was amusing, however.
>
> Sorry, you certainly sounded that way. (re-read your replies...)

That right?  So you equate a "smiley" with pride, rather than bemusement or good
humor?  That's an interesting analogy from one who's already demonstrated strong
inner-directedness inclinations.

> But as stated in my previous msg, that's ok.

Whatever.  I'd say, "mighty big of you," but your lack of sarcasm-detection
capability would make it pointless.

>> Selfishness.
>
> Can you explain to me what selfnishness means to you, when I'm only
> expressing my opinion and note (re-read my first posting to OP...)
> in which I've even acknowledged your concerns.
> So what's selfnishness?

If "the richness of the IDE" is anywhere near a prime criterion for choosing what
*language* is best-suited to a given task, there's an issue with objectivity.

> Karl, actually I don't like discussions in newsgroups if it doesn't
> contribute to the benefit of others.

Your reasoning is misleading, and has the potential for harm.

> So, if you'd like to wrap this up, you can continue our (so it appears)
> personal conversation via email.

I'll correct public misguidance in public, thanks.
Signature

.NET: It's About Trust!
http://vfred.mvps.org

Perry - 11 Apr 2007 20:35 GMT
> Whatever.  I'd say, "mighty big of you," but your lack of
> sarcasm-detection capability would make it pointless.

Actually, I'm beginning to like this conversation...
Isn't this a typical case of "the pot calling the ...." bla

So y're the type of man who screams around and expecting other people to
understand your "intellectual twitter twatter". (the smileys)
That is pointless indeed :-))

<vbg>
actually
LOL

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

>>> Pride?  Hardly.  Your reaction was amusing, however.
>>
[quoted text clipped - 29 lines]
>
> I'll correct public misguidance in public, thanks.
Karl E. Peterson - 11 Apr 2007 21:40 GMT
> That is pointless indeed :-))

Discussing it with you, apparently is, yep.  But at least others saw both sides.
Signature

.NET: It's About Trust!
http://vfred.mvps.org

Perry - 11 Apr 2007 21:51 GMT
> But at least others saw both sides.
You got that right!

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

>> That is pointless indeed :-))
>
> Discussing it with you, apparently is, yep.  But at least others saw both
> sides.
CS Hayes - 12 Apr 2007 02:36 GMT
Actually, I see both sides

1) Developers of VB6 are getting the short end of the stick because their
language is being phased out.  Especially those with a big investment in it.

2) VB is... Microsofts product, and sadly enough, it's their prerogative to
do with it as they wish even if it loses customers.  If Microsoft wants to
lose customers, hurrah for Linux and others.
Signature

Chris Hayes
Still a beginner (only 12 years)

> > But at least others saw both sides.
> You got that right!
[quoted text clipped - 11 lines]
> > Discussing it with you, apparently is, yep.  But at least others saw both
> > sides.
Perry - 12 Apr 2007 08:28 GMT
Hi CS Hayes,

> 1) Developers of VB6 are ... etc.
True!

> 2) VB is... Mirosoft ...lose customers ... etc
True again.

Websphere (Java) used to be an important player for multi tier enterprise
banking apps.
Some large international banks however, now have introduced a (.NET) VS Team
Performance Server
(test)domain...
International IT companies, like Avenade, ie. the joint venture between
Accenture (the system integrator) and MSFT, hired .NET developers by the
dozens (!) when the company started up,  just to be able to respond to their
customers needs.

And these are some observations of what's happening out there.

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

> Actually, I see both sides
>
[quoted text clipped - 23 lines]
>> > both
>> > sides.
Jonathan West - 16 Apr 2007 12:55 GMT
>>> I'm trying a trial of Office 2007 and the VBA ide is VB 6.5
>>> am I missing something here?
[quoted text clipped - 4 lines]
> Only InfoPath 2007 ships with VB.net IDE.
> I hope VB.net IDE will ship with SR1 or SR2 of Office 2007.

No chance. That kind of additional feature has never shipped in a service
pack before. VB.NET syntax can't easily be grafted into the internal layout
of templates to replace VBA for reasons of backwards compatibility, and the
VB.NET IDE can't be made available with VBA as the language being edited,
unless the underlying code for the editor were fundamentally changed. That
is because the Visual Studio.NET IDE makes certain assumptions concerning
the syntax of the languages it supports, and VBA doesn't conform to certain
of those assumptions.

> I've noticed some apprehension among VBA expert colleagues here in
> Holland.

Justifiably in my view

> I'm trying to convince them into investing in VB.net. My message is
> finally getting through to
> them but only after having showed them apps I developed and demonstrating
> the richness of the IDE.

The IDE is just one aspect of productivity. Another is performance of the
completed application, another is the time and effort necessary to create a
deployment package. A further aspect is the extent to which the IDE is
integrated into the object model of the application you are automating.

>>> From what I understand (and it's not a lot) VB.NET or VS2005 are
>>> external
[quoted text clipped - 8 lines]
> But, think about:
> Ok, as a beginner you would need to invest in VBA 6.5 all the same, right?

VBA is not going to disappear any time soon, unless Microsoft is going to
commit financial suicide by kissing goodbye to about a third of its revenue.

> Why not use the effort to learn VB.net from scratch, I wonder?

The principles involved in programming are much the same, and sound
programming techniques can be taught and learned in any language.

> As a beginner, it will take some effort (courses, courses and courses) but
> if you have some affinity with programming
> and your MS Word knowledge (I mean power user knowledge and not
> programming knowledge) is good, why not skip the VBA 6.5 step
> and jump right into VB.net?

I know of one community college which made the jump from doing a programming
course in VB6 to VB.NET, found themselves after a year with radically
reduced student numbers and declining pass-rates, and have changed tack and
now base the course on VBA using Word, Excel and Access.

I'm not suggesting that VB2005 is inappropriate for any programming task.
However, I think it is equally incorrect to write off VBA as inappropriate
because of its supposed outdatedness.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

Perry - 16 Apr 2007 17:57 GMT
> However, I think it is equally incorrect to write off VBA as inappropriate
> because of its supposed outdatedness.

Whose words were these? Be it inappropriate or be it outdated ?
Me?
Can you cite me ?

> The IDE is just one aspect of productivity.
True

> Another is performance of the  completed application, another is the time
> and effort necessary to create a deployment package.

I missed this aspect when porting VB projects to VB.net.
Hmm, I'd be interested to learn what aspects of VB.net apps could cause this
performance loss.

> A further aspect is the extent to which the IDE is integrated into the
> object model of the application you are automating.

We will always find workarounds for shortcomings in out-of-the-box tooling
... Of all people, you should know.

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

>>>> I'm trying a trial of Office 2007 and the VBA ide is VB 6.5
>>>> am I missing something here?
[quoted text clipped - 66 lines]
> However, I think it is equally incorrect to write off VBA as inappropriate
> because of its supposed outdatedness.
Jonathan West - 16 Apr 2007 18:18 GMT
>> However, I think it is equally incorrect to write off VBA as
>> inappropriate because of its supposed outdatedness.
>
> Whose words were these? Be it inappropriate or be it outdated ?
> Me?
> Can you cite me ?

You were suggesting that the OP should skip learning VBA and go straight
into VB.NET, based on your opinion of the richness of the IDE. The
implication was that the IDE (and perhaps other aspects) of VBA was
inferior, and being an older system, VBA was outdated in comparison to
VB.NET. Did I get that wrong?

>> The IDE is just one aspect of productivity.
> True
[quoted text clipped - 5 lines]
> Hmm, I'd be interested to learn what aspects of VB.net apps could cause
> this performance loss.

I explained that in another post. No need to repeat myself.

>> A further aspect is the extent to which the IDE is integrated into the
>> object model of the application you are automating.
>
> We will always find workarounds for shortcomings in out-of-the-box tooling
> ... Of all people, you should know.

Of course, I do know - and if we are going to compare IDEs for productivity,
then we would need to consider what add-ins are available for both IDEs that
enable productivity improvements if we are to come to a fully informed
decision. I use several add-ins for the VBA IDE, some free, some commercial.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

Perry - 16 Apr 2007 18:43 GMT
> VB.NET. Did I get that wrong?

You got that wrong.
In saying so, hope that I didn't hurt yr feelings if nevertheless you
perceived it that way.
If I recollect correctly, I was suggesting that to OP rather than
disqualifying VBA.

> I explained that in another post. No need to repeat myself.

Are you refering to intellisense ease ?
The information can be collected elsewhere. If the ease of intellisense
isn't coming your way, msdn2 library
will come to the rescue, and the young VB.net  developers, they start to
know the way...

Everything's online now ...
It can't be compared to the days where object models were the sole domain of
the experts.
The youngsters? One way or the other, they get their information, and know
where to find it, believe me!

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

>>> However, I think it is equally incorrect to write off VBA as
>>> inappropriate because of its supposed outdatedness.
[quoted text clipped - 32 lines]
> fully informed decision. I use several add-ins for the VBA IDE, some free,
> some commercial.
Perry - 16 Apr 2007 20:39 GMT
>> Another is performance of the  completed application

Still sincerely curious and actually very interested in what could cause a
.NET application to (possibly) loose performance.

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

>> VB.NET. Did I get that wrong?
>
[quoted text clipped - 62 lines]
>> a fully informed decision. I use several add-ins for the VBA IDE, some
>> free, some commercial.
Jay Freedman - 16 Apr 2007 21:00 GMT
>>> Another is performance of the  completed application
>
> Still sincerely curious and actually very interested in what could
> cause a .NET application to (possibly) loose performance.

I think Jonathan was referring to the requirements to interface .Net to COM
and to automate Word from an out-of-process executable, neither of which
apply to a VBA app running in-process.

The other side of that argument, of course, is that external apps can be
compiled and may run hundreds of times faster than equivalent interpreted
VBA code.

The overall application performance will depend on the balance between those
factors. That in turn depends on exactly what the application is doing, how
much data it's manipulating, and what algorithms you choose.

I'd love to see a series of benchmarks comparing VBA, VB6, and VB.Net for
various kinds of Word add-in apps. It would probably take months just to
agree what kinds of apps to study. :-)

Signature

Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Perry - 16 Apr 2007 22:10 GMT
> I think Jonathan was referring to the requirements to interface .Net to
> COM and to automate Word from an out-of-process executable, neither of
> which apply to a VBA app running in-process.

Just read it. (Was hosted in the other thread.)

True.
Because of the COM wrappers still being a PItA and not a regular library.
But -like the AD interface- the Office interface will be accessible as a
regular library.
And by the way, if it doesn't, the PIA's will be ok; as long as they're
reliable and represent the automation server to it's full extend.
When it comes to VB apps, the switch to .NET (note: this my personal
choice/comfort) has already taken place.
At the moment, for Office it still is VBA but it will move to VB2005 (be it
VSTO, VSTA or
VB.NET with a regular Office library incorporated)
It's like moving from Pascal to Delphi, or from WordBasic to VBA ...
Been there, done that ... didn't we?

> The other side of that argument, of course, is that external apps can be
> compiled and may run hundreds of times faster than equivalent interpreted
> VBA code.

Hmm, depends on the situation ...

> I'd love to see a series of benchmarks comparing VBA, VB6, and VB.Net for
> various kinds of Word add-in apps. It would probably take months just to
> agree what kinds of apps to study. :-)

Here's a wise statement!
Indeed.
The number of sites with VB classic/VB.net equivalents is growing ...

In case I need to emphasize my point of view (or my point):
It wasn't a (by all means) a disqualification of VB(A)
I was responding to OP sharing (some personal) experience,
as that was what OP initially asked for.
For all I know, my initial postings were of that extend.

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

>>>> Another is performance of the  completed application
>>
[quoted text clipped - 16 lines]
> various kinds of Word add-in apps. It would probably take months just to
> agree what kinds of apps to study. :-)
Jonathan West - 16 Apr 2007 11:31 GMT
> Hi,
>
> I don't like disagreeing with a Word MVP but you may be doing the
> equivalent
> of building a great horseshoe just when cars are being widely introduced.

I have no problem with people disagreeing with me. I don't regard myself as
being infallible, and in fact I learn new stuff about Word all the time, in
many cases from the experiences of others here on the Word groups. Don't
hesitate to disagree with me if you think I'm wrong.

> Microsoft is very commited to .Net and VSTO and finally the development
> environment for Word is as good as the one for Excel (the Word one was
[quoted text clipped - 5 lines]
> access
> to the CLR and the .Net libraries.

There are various problems with that. I'll describe each one in turn. They
may not be applicable in all cases, but they need to be considered when
making an informed decision.

1. The Office object model is COM-based, and VBA works in-process without
COM-NET interworking. Performance therefore tends to be better when using
VBA.

2. I hope never to hear that hoary old jibe about VBA programmers being
unable to understand object-orientation. When presenting an argument, it is
best not to insult the intelligence of those you disagree with.

3. There are severe problems with deploying VSTO add-ins. The MVPs who have
been attempting it recently have been screaming at Microsoft about it, and
the facilities for doing so are in my opinion thoroughly inadequate still.

4. If your application is primarily controlling Word documents, then the
primary need is for efficient access to the Word object model. Access to the
.NET framework is of much lesser importance, and any advantages of using
VB.NET are correspondingly reduced.

5. The latest VSTO only works with Office 2007. The previous (more limited)
one only worked with Office 2003. if you want an application to support
multiple versions of Office, then you need to use VBA. About 40% of my
customers still use Office 2000 or Office XP, and my VBA library code works
unmodified in all versions of Office from 2000 onwards. Because Microsoft is
still refining the interface between .NET and Office in successive versions
of VSTO, the kind of version independence achieved  by VBA is unlikely to be
matched by VSTO any time soon, which means that coe may have to be rewritten
in part every time you change version of Office, Visual Studio or VSTO.

6. I'm not at all convinced of the long-term commitment Microsoft has to
VB.NET. Public statements by senior people in Microsoft suggest to me that
Microsoft makes no distinction between a language and a platform, and that
when a platform changes, the language inevitably must as well. The idea that
a high-level language is something that insulates your code from the effects
of changes in platform is something which seems to have been forgotten in
Microsoft. Therefore when the successor to .NET comes along (and of course,
it will eventually) unless Microsoft has changed its mind, VB.NET code will
end up being as obsolete as VB6 code has become. Also, it is worth noting
that Microsoft was publicly thoroughly committed to the future of FoxPro,
until the day it announced the product would be discontinued.

> This is a very emotional issue for users who have learned and pushed VBA
> to

The problem is not about having learned VBA. It is that there is a lot of
VBA about, and Microsoft cannot remove support for it without causing all
companies that have VBA code they rely on to delay, perhaps permanantly,
their plans to upgrade to a newer version of Office. As Office makes up
something like a third of Microsoft's total revenue, and corporate sales
form the bulk of that, Microsoft dare not mess with VBA. It will be around
for a while. It is worth noting that three versions of Office have been
released since VB.NET came out, and they all still have VBA. That suggests
that, whatever the Visual Studio people may be saying about Microsoft's
commitment to all things .NET, the Office people are being somewhat more
cautious and pragmatic about it.

> places no one ever anticipated but VSTO is the way to go. I don't want to
> start a flame war and I have the greatest respect for the VBA experts on
> this
> site but that is the way it is.

If you expect flames from me, I fear you will be disappointed. I'm
interested solely in the truth of the matter, and I have an interest in
making sure I provide the best possible service for my own customers. That
means using whatever technology is best for the purpose, not necessarily
what is the latest thing being pushed by Microsoft.

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

Cindy M. - 18 Apr 2007 17:27 GMT
Hi Jonathan,

> 5. The latest VSTO only works with Office 2007. The previous (more limited)
> one only worked with Office 2003.

Correction:

The latest version of VSTO (2005 SE, for Add-ins) works with both 2003 and
2007. And people have been able to coerce the 2003 add-ins to work with
earlier versions

VSTO 2005 document-level customizations can only be designed against
Word/Excel 2003. But they will run with Office 2007.

The Office 2007 document-level customizations aren't even in beta yet
(although that's getting close) and will be part of "Orcas". Given the radical
change in file format and the different direction MSFT is taking with Word and
Office, it shouldn't surprise that 2007 VSTO projects won't go backwards to
earlier versions.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)
Jonathan West - 19 Apr 2007 15:11 GMT
Thanks for the correction Cindy

Signature

Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org

> Hi Jonathan,
>
[quoted text clipped - 27 lines]
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
Karl E. Peterson - 10 Apr 2007 02:20 GMT
>> I've noticed some syntax difference.  What are the major differences
>> between Visual Basic in VB2005 and VB in Office 2003?
>
> Just about everything.
<snip>
> That's the short answer. If you want the long answer, wait for Karl and
> Jonathan to come along. <eg>

Who do you think Anderson Cooper got his catchphrase from, hmmmm?  <vbg>

  http://www.cnn.com/exchange/ireports/topics/forms/2006/12/ac360.anon.html

Here's the full list of "changes," according to Microsoft:

  Visual Fred: Deprecation, Fact or Fiction?
  http://vb.mvps.org/vfred/deprecation.asp

(See the links in the lower half of the page.)
Signature

.NET: It's About Trust!
http://vfred.mvps.org

Perry - 10 Apr 2007 22:32 GMT
As to experience or age or what other relevant capabilities you'd like to
hear:
Unix, PASCAL, TURBO PASCAL, C, COBOL, FORTRAN, CLIPPER

That's my background.
There was no OO programming in those days ...
Guess I'm not *that* young after all, hey ... whatchasay?
(can't believe that I'm getting so excited here ...)

And considering the fact that I will support (and keep on supporting) my
customers on legacy
VB6 files, what's wrong with having a personal opinion that VB.NEt is a
state-of-the-art development platform????
What's wrong with you ...  :-)

--
Krgrds,
Perry

System:
Vista/Office Ultimate
VS2005/VSTO2005 SE

"Perry" <drumper@gmail.com> schreef in bericht news:...
> And btw, I can't remember having responded to you.
> Far all I know, I was politely responding to the OP, giving some
[quoted text clipped - 69 lines]
>>> position.  You do them no favor, leading them on the blind path of
>>> betrayal for your own personal comfort.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.