VBA/Macros in Word 2008 ??

S

Skyflyer

Version: 2008
Operating System: Mac OS X 10.4 (Tiger)
Processor: Power PC

I'll keep this brief (at least that was the plan!).
I am a Windows user (yes, I've heard most of it already)! ...
My friend has an iBook G4 with Word2008. She has some medical input forms that I had developed on WinOffice 2003 and she used on the computer at work. She wants to use those forms on her Mac laptop. In those forms (Office2003), I had some simple VBA code in a macro in the template.
All the code did was to control the order of tabbing through the input fields through use of the Entry/Exit macro in the Form field.
I'm willing to do the research and work to do this on MacWord2008, but ....
I understand that VBA does not work on 2008.
I just want to make sure that it is possible to do something like I need before I spend the time trying figure out how to do it. I'm not sure how complex AppleScript can be. Can you get down to the level of controlling the cursor after entering data in a form field. She does not want to just tab across and down. She needs to do one area first and then another.
So, could someone let me know if it can be done in MacWord2008 and I'll go from there.

Also, Am I correct in thinking that this tab control that I want to do could be done in Macword2004 with VBA/macros?
If so, I might try to convince her to go to 2004 to do this.
I'm not afraid to tackle this and do some digging and testing to get it done. I just don't want to spend time getting to that point and finding out that it can't be done.
If there are some previous posts or other sites that might help me, please point them out to me.
If someone has the time, could they tell me what they can.
Many thanks ...
Bob
 
J

John McGhie

In Mac Word 2008, VBA is not there at all. It's not a question of not
"working", the interpreter is physically not there.

In Mac Word 2004, an old version of VBA is available. However, I seem to
remember that setting a tab order was one of the things that didn't work in
Mac Word VBA.

1) In Word 2008, not only is the VBA missing, so is the ability to create
forms of the kind you are talking about. You can enter individual form
fields, but you cannot create your own userforms like you can in Word 2003.

2) AppleScript is, if anything, more powerful than VBA, and will go down to
the bit level as VBA will. However, doing this would be a chore, because
AppleScript does not script the "application", it scripts the "Operating
System". You are sitting "outside" the application telling it to do things.
And AppleScript has not implemented some of the objects and collections in
Word.

For example, you won't be able to retrieve a "userform" from Word in
AppleScript, because there aren't any in this version :)

3) You can, of course, create your own dialogs in AppleScript, and feed the
data from there into a Word document. I don't know how, but since
AppleScript is an Application Programming Language, custom dialog boxes are
well within its reach.

So: The first law of computing: if you can't find the answer, change the
question...

4) The first thing I would to is to use Word 2008's available Text and
Fillin fields. Make up a page containing the fields in the order in which
she wants to type them. Then bookmark the fields and set cross-references
on the next page to copy the content of the fields into the text in the
order that they should print.

So the user works in the first page, hitting Tab to go to the next field
each time. The second page contains cross-references that re-arranges the
form data in printing order.

This will give you a native Word 2008 solution without a lot of research and
coding.

Currently there is a bug in Word 2008 that constrains how you can use
section breaks to protect the document. Word 2008 can't currently allow you
to protect only "part" of a document.

If a document contains any protected sections, currently Word 2008 opens the
document as though ALL sections are protected. Hopefully they will fix that
bug soon.

5) The other solution you might consider is to install a copy of Virtual PC
7 on the iBook. That will contain a licensed copy of Windows XP, and enable
her to run Word 2003 (very slowly!) on her iBook G4.

If she can find a copy of Microsoft Office 2004 Professional for Mac, that
is a bundled product that includes VPC7 and Office 2004.

Hope this helps


Version: 2008
Operating System: Mac OS X 10.4 (Tiger)
Processor: Power PC

I'll keep this brief (at least that was the plan!).
I am a Windows user (yes, I've heard most of it already)! ...
My friend has an iBook G4 with Word2008. She has some medical input forms that
I had developed on WinOffice 2003 and she used on the computer at work. She
wants to use those forms on her Mac laptop. In those forms (Office2003), I had
some simple VBA code in a macro in the template.
All the code did was to control the order of tabbing through the input fields
through use of the Entry/Exit macro in the Form field.
I'm willing to do the research and work to do this on MacWord2008, but ....
I understand that VBA does not work on 2008.
I just want to make sure that it is possible to do something like I need
before I spend the time trying figure out how to do it. I'm not sure how
complex AppleScript can be. Can you get down to the level of controlling the
cursor after entering data in a form field. She does not want to just tab
across and down. She needs to do one area first and then another.
So, could someone let me know if it can be done in MacWord2008 and I'll go
from there.

Also, Am I correct in thinking that this tab control that I want to do could
be done in Macword2004 with VBA/macros?
If so, I might try to convince her to go to 2004 to do this.
I'm not afraid to tackle this and do some digging and testing to get it done.
I just don't want to spend time getting to that point and finding out that it
can't be done.
If there are some previous posts or other sites that might help me, please
point them out to me.
If someone has the time, could they tell me what they can.
Many thanks ...
Bob

--
Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Consultant Technical Writer
McGhie Information Engineering Pty Ltd
http://jgmcghie.fastmail.com.au/
Sydney, Australia. S33°53'34.20 E151°14'54.50
+61 4 1209 1410, mailto:[email protected]
 
L

lindsay

And, of course, there is the proper solution - implement VBA for at least current-model MacOS. As I hear, it is "can't be bothered" rather than "can't be done", but presumably implementing would benefit MS (more features!) as well as the rest of us.

(I didn't think I'd miss it until I tried to run MathType...)
 
J

JE McGimpsey

And, of course, there is the proper solution - implement VBA for at least
current-model MacOS. As I hear, it is "can't be bothered" rather than "can't
be done", but presumably implementing would benefit MS (more features!) as
well as the rest of us.

(I didn't think I'd miss it until I tried to run MathType...)

I suspect it's not so much "can't be bothered" as "can't see a way to
make a profit doing it stand-alone".

And, of course, any effort to implement it for current version will take
away from development for future versions.

The proportion of ALL users of Office that use VBA-related technology is
fairly small (but vocal!). The proportion of Mac Office users is even
smaller.
 
J

John McGhie

No. It was literally "Ran out of time and developers", due to the
tripple-switch: new file format, new processor architecture, and new OS
architecture (X-code).

They are frantically hiring and training developers to work in the new
development environment.

But there is no way to retro-fit VBA into Office 2008. Sorry: it would take
so long the next version would be out before they got it done.

Cheers


And, of course, there is the proper solution - implement VBA for at least
current-model MacOS. As I hear, it is "can't be bothered" rather than "can't
be done", but presumably implementing would benefit MS (more features!) as
well as the rest of us.

(I didn't think I'd miss it until I tried to run MathType...)

--

Don't wait for your answer, click here: http://www.word.mvps.org/

Please reply in the group. Please do NOT email me unless I ask you to.

John McGhie, Microsoft MVP, Word and Word:Mac
Nhulunbuy, NT, Australia. mailto:[email protected]
 

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