and the like do not seem to work in VBA for Word X for Mac OSX.
Is there a Mac equivalent?
John Kilcullen
> Windows("output.doc").Activate
>
> and the like do not seem to work in VBA for Word X for Mac OSX.
>
> Is there a Mac equivalent?
As long as you have a file named output.doc open
Windows("output.doc").Activate
works fine in Word v.X/VBA. What "like" are you referring to, and what
does "do not seem to work" mean to you (e.g., run-time errors? crashes?
nothing? the wrong thing?)?
'select extract
Selection.WholeStory
Selection.Copy
'paste into output file and process
Windows("output.doc").Activate
Selection.WholeStory
Selection.Paste
Call zCet2Source
The procedure would continue, including several stages in
which other documents are activated (process.doc,
source.doc, extract.dot -- that's what I mean by "the
like", I assume that none of them will work). The procedure
runs satisfactorily in Word 2000 for Windows. When I try to
run it in Word X for Macintosh, I get the error message
"Runtime error 5941 The requested member of the collection
does not exist", and debug highlights
Windows("output.doc").Activate
Output.doc is in fact open, and so are the other documents
to be activated at later stages.
John Kilcullen
>.
>
> When I try to run it in Word X for Macintosh, I get the error message
> "Runtime error 5941 The requested member of the collection does not
> exist", and debug highlights Windows("output.doc").Activate
>
> Output.doc is in fact open, and so are the other documents
> to be activated at later stages.
>
Hmm... Are you sure it's "output.doc" that is open, and not just
"output"? MacWord doesn't automatically add the extension when it
creates a file.
Otherwise, I'm not sure what's going on.
John Kilcullen
>.
>
> I seem to have fixed the problem by reducing the demand on
> memory. Thanks for your comments.
Just for my edification, how did you do that?