Word 2003 VB IDE & VB2005

C

CS Hayes

I've noticed some syntax difference. What are the major differences between
Visual Basic in VB2005 and VB in Office 2003?
 
J

Jay Freedman

CS said:
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>

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
C

CS Hayes

So, here's another question:

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

Jonathan West

CS Hayes said:
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.
 
O

old man

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
 
P

Perry

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
 
K

Karl E. Peterson

Jay Freedman said:
Just about everything.
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.)
 
C

CS Hayes

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)
 
K

Karl E. Peterson

CS Hayes said:
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
 
P

Perry

I'm trying a trial of Office 2007 and the VBA ide is VB 6.5Nope, correctomundo
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.
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



CS Hayes said:
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)
--
Chris Hayes
Still a beginner (only 12 years)


Perry said:
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
 
C

CS Hayes

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.
 
K

Karl E. Peterson

Perry said:
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.
 
K

Karl E. Peterson

CS Hayes said:
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!
 
P

Perry

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
 
P

Perry

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



Perry said:
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
 
P

Perry

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



Perry said:
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
 
P

Perry

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
 
K

Karl E. Peterson

Perry said:
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.
 
P

Perry

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
 
K

Karl E. Peterson

Perry said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top