• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTask Open Word File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTask Open Word File


  • Subject: NSTask Open Word File
  • From: Gurkan Erdogdu <email@hidden>
  • Date: Thu, 11 Aug 2016 22:20:05 +0000 (UTC)

Hi folks
In my Swift application, I try to open a Word file with Microsoft Word application via NSTask. Here is the code:
                let task = NSTask()
                task.launchPath = bundle!.executablePath
                task.arguments = ["file.docx"]
                task.launch()
                task.waitUntilExit()

But when word is launched, it popsup Grant Access dialog box. How can I dismiss this dialog box and open the file directly?
BestGurkan

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTask Open Word File
      • From: Jens Alfke <email@hidden>
    • Re: NSTask Open Word File
      • From: Charles Srstka <email@hidden>
  • Prev by Date: Re: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
  • Next by Date: Re: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)
  • Previous by thread: Re: Drag and Drop on iOS
  • Next by thread: Re: NSTask Open Word File
  • Index(es):
    • Date
    • Thread