Le 2 oct. 06 à 05:11 Matin, Lennox Jacob a écrit:

Hello,
If I create a text file on the desktop from MyApp and I want it to be opened by Microsoft Word as soon as it is created, can that be done.
I know how to create the file on the desktop already.
I also have (f = folderitem)
f.MacCreator = "MSWD"
f.MacType = "text"

The file is created on the desktop but I have to double-click on it for it to be opened.
Can it be opened automatically as soon as it is created?

Please help.

Thanks.

Lennox.

If your file is created as a Word document, you can use f.launch.

Else, you can use an AppleEvent:

  dim ae As AppleEvent

ae = NewAppleEvent("aevt","odoc","MACS") 'Tells the Finder to open an item

ae.ObjectSpecifierParam("usin") = GetUniqueIDObjectDescriptor ("appf",nil,"MSWD") 'Parameter "usin" means "using"; the app in which to open the item. The right part of the "=" looks for the app whose MacCreator is "MSWD" (i.e refers to Word).

  ae.FolderItemParam("----")=f 'The item to open
  if not ae.Send then
    MsgBox "Well, the Finder has quit."
  end if_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to