Microsoft KB Archive/122500

FileOpen Does Not Open More Than One Document Concurrently

PSS ID Number: Q122500 Article last modified on 06-30-1995

6.00

MACINTOSH

= SYMPTOMS =

In Word for the Macintosh, you cannot use the FileOpen macro command to open multiple documents concurrently, as in the following example

Sub Main FileOpen .Name = <“FIRST.DOC”> <“SECOND.DOC”> End Sub

where  and  are separate documents.

In contrast, the above macro does open both FIRST.DOC and SECOND.DOC in Microsoft Word for Windows.

= CAUSE =

In the Macintosh environment, you can use spaces as valid characters in a filename; therefore, you cannot use a space as a delimiter between two filenames. In the MS-DOS and Windows environments, spaces are not allowed as valid characters in filenames; therefore, they can be used as effective delimiters.

= RESOLUTION =

To correct this problem, use multiple FileOpen commands to open multiple files on the Macintosh. Using the above example, the following macro opens both FIRST.DOC and SECOND.DOC in Word for the Macintosh:

Sub Main FileOpen .Name = “FIRST.DOC” FileOpen .Name = “SECOND.DOC” End Sub

KBCategory: kbusage kbmacro KBSubcategory: Additional reference words: macword 6.00 WordBasic file open

=
================================================================

Copyright Microsoft Corporation 1995.