Path

7x / documentation / extensions / ez publish extensions / odf import / export / creating a word document to...


Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Creating a Word Document to Import

Follow the steps described in this documentation page in order to be able to create a Word (.doc) document that can be inported into eZ Publish through eZ ODF Extension.

  1. You may want to create a new class. If that is the case, you can create one on eZ Publish Administration Interface --> Setup --> Classes. Select the Class Group and then click on the "New Class" button:
Creating a New Class

Creating a New Class

Add the attributes you want your new class to have by clicking on the button "Add Atribute". The attributes will be used on the Word (.doc) document to be imported, to match the exact content you want to import.

2. Include your class in RegisteredClassArray[] on odf.ini.append.php, under [ODFImport]:

RegisteredClassArray[]=your_class

This is just an example. 'Your class' is the name of the class you have created on eZ Publish Administration Interface.

3. Add your class definition to the odf.ini.append.php file:

[your_class]
DefaultImportTitleAttribute=attribute1
DefaultImportBodyAttribute=attribute2
Attribute[attribute1]=attribute1
Attribute[attribute2]=attribute2
Attribute[attribute3]=attribute3

Replace 'attribute' with the name of the attribute you created for the class.

4. Now, follow these steps on creating the settings inside your word document:

  1. Open the Word 2003 application;
  2. Create a new style in Word named eZSectionDefinition with any formatting you want (please refer to the link http://office.microsoft.com/en-us/word-help/create-a-new-style-HP005240626.aspx in order to see how to create a style on Word 2003);
  3. Add the desired attributes inside your text content, one per line. The attributes added to the document must be the same that you added to your class);
  4. Apply your eZSectionDefinition style to each attribute;
  5. Save your document as Word 2003 (.doc) format.

Here is a sample of a document created on Word 2003 with the Class attributes defined:

Word Document Sample

Word Document Sample

Andrea Melo (01/10/2012 2:47 pm)

Andrea Melo (03/12/2012 5:00 pm)


Comments

There are no comments.