Hi all,
In my application, I want to create a docment with content, here's my
code:
   DocumentListEntry createdEntry = null;
   // Create an empty word processor document
    createdEntry = createNewDocument("NewDocTitle", "document");

public DocumentListEntry createNewDocument(String title, String type)
                                throws IOException, ServiceException {
                DocumentListEntry newEntry = null;
                if (type.equals("document")) {
                        newEntry = new DocumentEntry();
                        } else if (type.equals("presentation")) {
                                newEntry = new PresentationEntry();
                                } else if (type.equals("spreadsheet")) {
                                        newEntry = new SpreadsheetEntry();
                                        }
                newEntry.setTitle(new PlainTextConstruct(title));
                                //--------
                newEntry.setContent(new PlainTextConstruct("hello world!"));

                return client.insert(new 
URL("http://docs.google.com/feeds/documents/
private/full/"), newEntry);
        }

It does create a new docment in my docs acount, but there is no
content. It seems that newEntry.setContent(new PlainTextConstruct
("hello world!")); had not worked.
Anyone who knows why?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Docs Data APIs" group.
To post to this group, send email to Google-Docs-Data-APIs@googlegroups.com
To unsubscribe from this group, send email to 
google-docs-data-apis+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Docs-Data-APIs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to