• 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
Pages - save document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Pages - save document


  • Subject: Pages - save document
  • From: Robert Cerny <email@hidden>
  • Date: Mon, 5 Nov 2007 16:50:08 +0100

Hi folks,
I'm trying to save document into .doc format using scripting bridge and get a crash which I can't resolve.


pages = (PagesApplication*)[SBApplication applicationWithBundleIdentifier:@"com.apple.iWork.Pages"];
NSLog(@"Pages are running");


NSArray *docs = [NSArray arrayWithArray:(SBElementArray*)[pages documents]];
NSLog([docs description]);


NSEnumerator *e = [docs objectEnumerator];
PagesDocument *temp;

while (temp = [e nextObject])
{
	[temp saveAs:@".doc" in:[NSURL URLWithString:@"/tmp/test.doc"]];
}

The crash details:
2007-11-05 16:44:57.973 c[12113:813] An uncaught exception was raised
2007-11-05 16:44:57.974 c[12113:813] Apple event returned an error. Event = 'core'\'save'{ '----':'obj '{ 'want':'docu', 'from':'null'(), 'form':'indx', 'seld':1 }, 'fltp':'utxt'(".doc"), 'kfil':'utxt'("/tmp/ test.doc") }
Error info = {
ErrorNumber = -50;
ErrorString = "The document cannot be exported to the \".doc\" format.";
}


Thanks
Robert

_______________________________________________

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: Pages - save document
      • From: glenn andreas <email@hidden>
  • Prev by Date: Re: NSInvocation problem - "NSView not correctly initialized"
  • Next by Date: Re: Comparing NSColor instances
  • Previous by thread: Re: display a text field?
  • Next by thread: Re: Pages - save document
  • Index(es):
    • Date
    • Thread