Mac Word add-in - where to start

S

Sunny

Hi,
can someone point me to a good web publications, or books, etc. in order
to get started in writing a Mac Word add-in. Mac Word object model, etc.

I really googled a lot, but can not find any useful resource to get me
started.

Also, can someone answer what the options as a language/technology
choice, except VBA?

Thanks
Sunny
 
B

Beth Rosengard

Hi Sunny,

You're going to get better advice than I can give you but since no one has
replied yet, I'll start you off.

If you're in Office/Word 2004, an alternative to VBA would be AppleScript.
If I planned to write code just for the Mac, that's what I would learn
first. You'll find some information about learning AS at the following
sites (which I once bookmarked from someone else's post):

<http://www.apple.com/applescript/>

<http://maccentral.macworld.com/columns/briggs.shtml>

<http://www.AppleScriptSourcebook.com/>

<http://www.macobserver.com/tips/applescript/index.html>

Paul Berkowitz may chime in here with some better references.

As for VBA, you can get at least some help at the following site:

<http://www.word.mvps.org/FAQs/index.htm> (If using Safari, hit Refresh
once or twice; better to use a different browser.)

When you get to the site, click on the Macros/VBA tab.

Hope this helps.

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

Beth Rosengard
Mac MVP

Mac Word FAQ: <http://word.mvps.org/MacWordNew/index.htm>
Entourage Help Page: <http://www.entourage.mvps.org>
 
S

Sunny

Hi Sunny,

You're going to get better advice than I can give you but since no one has
replied yet, I'll start you off.

If you're in Office/Word 2004, an alternative to VBA would be AppleScript.
If I planned to write code just for the Mac, that's what I would learn
first. You'll find some information about learning AS at the following
sites (which I once bookmarked from someone else's post):

<http://www.apple.com/applescript/>

<http://maccentral.macworld.com/columns/briggs.shtml>

<http://www.AppleScriptSourcebook.com/>

<http://www.macobserver.com/tips/applescript/index.html>

Paul Berkowitz may chime in here with some better references.

As for VBA, you can get at least some help at the following site:

<http://www.word.mvps.org/FAQs/index.htm> (If using Safari, hit Refresh
once or twice; better to use a different browser.)

When you get to the site, click on the Macros/VBA tab.

Hope this helps.

Hi Beth,
thanks for the replay.

So, there is no chance for using something else like C++, like in Win
world?

Sunny
 
D

Daiya Mitchell

So, there is no chance for using something else like C++, like in Win
Haven't a clue. RealBasic might be another alternative.

You might want to google for existing products and see if you can figure out
what they are written in. You might also want to spend some time in the
developer section of Apple's website, which might discuss your options. And
I would look for newsgroups aimed at developers, you might find some
cross-platform knowledge in one of those. The only developers I know of on
these groups are using AppleScript, I think.

But I'm pretty sure that the add-ins I have (EndNote and Acrobat) are
written at least partially in VBA, and distributed at least partially as
templates holding macros, on both Mac and win.

By the way, microsoft.public.office.mac is no longer an active ng.
 
J

John McGhie [MVP - Word and Word Mac]

Hi Sunny:

No, no C++ or .Net in Mac Word. (Well, I believe it's 'theoretically'
possible, but the headers and APIs you need are not easily available since
there's no SDK for Mac Office.)

So AppleScript is your preferred weapon, followed by RealBasic. VBA in Mac
Word is a limited subset of PC Word. However, the VBA Macro Recorder is a
very useful way of doing the grunt work of getting you started. Where
possible record what you want to do, then have a look at the code that has
been recorded. It's a hell of a lot quicker than looking everything up.

Cheers

--

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
 
S

Sunny

Hi Sunny:

No, no C++ or .Net in Mac Word. (Well, I believe it's 'theoretically'
possible, but the headers and APIs you need are not easily available since
there's no SDK for Mac Office.)

So AppleScript is your preferred weapon, followed by RealBasic. VBA in Mac
Word is a limited subset of PC Word. However, the VBA Macro Recorder is a
very useful way of doing the grunt work of getting you started. Where
possible record what you want to do, then have a look at the code that has
been recorded. It's a hell of a lot quicker than looking everything up.

Cheers

Hi John,
thanks for the post. So, where sould I start reading? Where I can find
the object model at least. Are there any guides, books, etc. for
automating Word for Mac?

Thanks

Sunny
 
J

John McGhie [MVP - Word and Word Macintosh]

Hi Sunny:

1) Start the Microsoft Word VBA Editor

2) Search for the Help Topic " Microsoft Word Objects".

Word and VBA have different Help. You have to have the VBA Editor running
to see the nitty-gritty details.

Any book you get on PC VBA is fine in Mac Word. Particularly books about
Word 2000. The VBA in Mac Word stops at the VBA 5 (Word 2000) level. But
any book will be fine: the compiler will let you know soon enough what won't
work :)

You could usefully while away a few hours here:
http://www.word.mvps.org/FAQs/MacrosVBA.htm

Use Firefox or IE to get to that page. Safari has a bug that causes it to
be unable to display the page.

Cheers


Hi John,
thanks for the post. So, where sould I start reading? Where I can find
the object model at least. Are there any guides, books, etc. for
automating Word for Mac?

Thanks

Sunny

--

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
 
P

Paul Berkowitz

And for AppleScript version, open the Word dictionary in Script Editor and
get the Word AppleScript Reference from the MacTopia website
(<http://www.microsoft.com>, Resources/Developer/AppleScript). Quite cool is
to take a look at the dictionary in the commercial Script Debugger (Late
Night Software, www.latenightsw.com), demo available, and check the Object
Model pane. Similar to where John is sending you in VB Editor (where you can
also check the Object Browser).

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

From: "John McGhie [MVP - Word and Word Macintosh]" <[email protected]>
Newsgroups: microsoft.public.mac.office.word,microsoft.public.office.mac
Date: Fri, 25 Mar 2005 23:35:59 +1100
Subject: Re: Mac Word add-in - where to start

Hi Sunny:

1) Start the Microsoft Word VBA Editor

2) Search for the Help Topic " Microsoft Word Objects".

Word and VBA have different Help. You have to have the VBA Editor running
to see the nitty-gritty details.

Any book you get on PC VBA is fine in Mac Word. Particularly books about
Word 2000. The VBA in Mac Word stops at the VBA 5 (Word 2000) level. But
any book will be fine: the compiler will let you know soon enough what won't
work :)

You could usefully while away a few hours here:
http://www.word.mvps.org/FAQs/MacrosVBA.htm

Use Firefox or IE to get to that page. Safari has a bug that causes it to
be unable to display the page.

Cheers


Hi John,
thanks for the post. So, where sould I start reading? Where I can find
the object model at least. Are there any guides, books, etc. for
automating Word for Mac?

Thanks

Sunny

--

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