Visual Basic for Applications

K

Kenneth Cohen

Can anyone recommend a book which I can buy to learn to program VBA for
Word? I have limited hobby-based programming experience, and what I really
need is a beginner-oriented tutorial to walk me through the essentials.
 
M

matt neuburg

Kenneth Cohen said:
Can anyone recommend a book which I can buy to learn to program VBA for
Word? I have limited hobby-based programming experience, and what I really
need is a beginner-oriented tutorial to walk me through the essentials.

I like the "Learning" book from O'Reilly (by Steve Roman). m.
 
P

Paul Berkowitz

Can anyone recommend a book which I can buy to learn to program VBA for
Word? I have limited hobby-based programming experience, and what I really
need is a beginner-oriented tutorial to walk me through the essentials.

Personally I used the O'Reilly "Writing Word Macros" by Steven Roman, in
conjunction with the very good Word VBA Help. The fact that the book dates
from 1999 is actually very good as far as Mac Word (up to and including
2004) goes, since it's describing the same VBA 5.0 that Mac Word still uses
and has no VBA 6.0 material that later versions of Word Windows (later than
97) have, There's almost nothing in it that wouldn't apply to Mac Word, and
those few things - to do with file paths, mostly - are well described in the
VBA Help.

I know that some of the Word (Windows) MVPs who use VBA prefer other books,
so you could ask over on microsoft.public.word.vba.general, but I'd imagine
that many of their suggestions would be for books about VBA 6.0, unless you
can find earlier versions. You'd have to learn what to ignore (again the VBA
Help will often put you right).

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
B

Beth Rosengard

Hi Kenneth,

In light of what Paul says about Word's VBA Help, are you aware of how to
find it? It's not in the regular Word Help. Go to Tools> Visual Basic
Editor and *then* go to the Help menu where you'll find Visual Basic Help.

--
***Please always reply to the newsgroup!***

Beth Rosengard
MacOffice MVP

Mac Word FAQ: <http://word.mvps.org/MacWordNew/index.htm>
(If using Safari, hit Refresh once or twice ­ or use another browser.)
Entourage Help Page: <http://www.entourage.mvps.org>
 
K

Kenneth Cohen

Many thanks, I know about VBA Help.

From: Beth Rosengard <[email protected]>
Newsgroups: microsoft.public.mac.office.word
Date: Tue, 29 Mar 2005 14:53:54 -0800
Subject: Re: Visual Basic for Applications

Hi Kenneth,

In light of what Paul says about Word's VBA Help, are you aware of how to
find it? It's not in the regular Word Help. Go to Tools> Visual Basic
Editor and *then* go to the Help menu where you'll find Visual Basic Help.

--
***Please always reply to the newsgroup!***

Beth Rosengard
MacOffice MVP

Mac Word FAQ: <http://word.mvps.org/MacWordNew/index.htm>
(If using Safari, hit Refresh once or twice ­ or use another browser.)
Entourage Help Page: <http://www.entourage.mvps.org>
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Kenneth:

In addition to what the others said, I would suggest that any book on Word
2000 VBA will be good. Sure, it's a level ahead of Word 2004, but there's
not many things that won't work.

The main problem I have is that the Integrated Development Environment is
only partially implemented in Mac Word. There's no "Prompt you thorough"
autocomplete, there's no Locals window, and the Help is not as complete.

However, the Word 2003 VBA Help is available online, here:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbawd11/ht
ml/wohowUnderstandingObjects1_HV05213901.asp>

You will find that it is much more complete and expansive, and most of the
things you read about will work on the Mac (and the compiler will warn you
instantly if they won't).

Two suggestions: Set Option Explicit at the top of your VBA Project. This
forces you to declare all your variables and gets rid of a lot of spelling
errors and typos. And each time you complete a statement, Compile the
project: the compiler will error immediately if you are being naughty!

Hope this helps

Many thanks, I know about VBA Help.

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 
K

Kenneth Cohen

Thanks so much for the advice. I've looked at several books over the last
six months. Ended up with Sams Teach Yourself Microsoft Word 2000
Automation in 24 Hours, which someone here had been good enough to
recommend. A genuine beginner's book, although it helps if you've had even
rudimentary programming experience. It's excellent, step by step, detailed,
understandable, seems to assume absolutely nothing about my knowledge and
understanding. It's also out of print, but available through Amazon from
used book sellers. I can see that once I get through it, I'll have enough
of a grasp of VBA to "graduate" to other books on the subject. All this to
better automate my law practice! As I always tell people, learning is a
life-long experience.

From: "John McGhie [MVP - Word and Word Macintosh]" <[email protected]>
Newsgroups: microsoft.public.mac.office.word
Date: Sun, 10 Apr 2005 17:00:43 +1000
Subject: Re: Visual Basic for Applications

Hi Kenneth:

In addition to what the others said, I would suggest that any book on Word
2000 VBA will be good. Sure, it's a level ahead of Word 2004, but there's
not many things that won't work.

The main problem I have is that the Integrated Development Environment is
only partially implemented in Mac Word. There's no "Prompt you thorough"
autocomplete, there's no Locals window, and the Help is not as complete.

However, the Word 2003 VBA Help is available online, here:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbawd11/ht
ml/wohowUnderstandingObjects1_HV05213901.asp>

You will find that it is much more complete and expansive, and most of the
things you read about will work on the Mac (and the compiler will warn you
instantly if they won't).

Two suggestions: Set Option Explicit at the top of your VBA Project. This
forces you to declare all your variables and gets rid of a lot of spelling
errors and typos. And each time you complete a statement, Compile the
project: the compiler will error immediately if you are being naughty!

Hope this helps

Many thanks, I know about VBA Help.

--

Please reply to the newsgroup to maintain the thread. Please do not email
me unless I ask you to.

John McGhie <[email protected]>
Microsoft MVP, Word and Word for Macintosh. Consultant Technical Writer
Sydney, Australia +61 4 1209 1410
 

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