# Class: makemsdoc

## makemsdoc

#### new makemsdoc(genobj, new_type, options, gen_private, type_info)

lib/msofficegen.js, line 46

Extend officegen object with MS-Office support.

  This method extending the given officegen object with the common code needed by any MS-Office based document. Use this module for every type of MS-Office document.

  Name | Type | Description
  --- | --- | ---
  `genobj` | object | The object to extend.
  `new_type` | object | The type of object to create.
  `options` | object | The object's options.
  `gen_private` | object | Access to the internals of this object.
  `type_info` | object | Additional information about this type.

  ##### Example

  Using this module for implementing a new MS-Office based document type:

      var baseobj = require ( "officegen" );
      var msdoc = require ( "./lib/msofficegen.js" );

      function makeMyDoc ( officegenObj, typeCodeName, options, officegenObjPlugins, typeInfo ) {
      	msdoc.makemsdoc ( officegenObj, typeCodeName, options, officegenObjPlugins, typeInfo );
      	officegenObjPlugins.plugs.type.msoffice.makeOfficeGenerator ( 'word', 'document', {} );

      	officegenObj.on ( 'clearData', function () {
      	});
      }

### Methods

#### innercbMakeCore(data)

lib/msofficegen.js, line 165
  ???.

  Name | Type | Description
  --- | --- | ---
  `data` | object | Ignored by this callback function.

  ##### Returns:

  Text string.

#### innercbMakeMainFilesList(data)

lib/msofficegen.js, line 122
  Create the main files list resource.

  Name | Type | Description
  --- | --- | ---
  `data` | object | Ignored by this callback function.

  ##### Returns:

  Text string.

#### innercbMakeTheme(data)

lib/msofficegen.js, line 155
  ???.

  Name | Type | Description
  --- | --- | ---
  `data` | object | Ignored by this callback function.

  ##### Returns:

  Text string.

#### innercbOfficeClearAfterGenerate(err, written)

lib/msofficegen.js, line 213
  Clean after finishing to generate the document. This method destroying any additional resources added by the 'beforeGen' effect to the generator.

  Name | Type | Description
  --- | --- | ---
  `err` | object | Generation error message (if there were any).
  `written` | object | Number of bytes been created.

#### innercbOfficeClearDocData()

lib/msofficegen.js, line 227
  Clear all the information of the current document.

#### innerclearSmartArrayFromType(arr, type_to_clear)

lib/msofficegen.js, line 188
  Remove selected records from the given array. This method destroys records inside the given array of the given type.

  Name | Type | Description
  --- | --- | ---
  `arr` | object | The array to work on it.
  `type_to_clear` | object | The type of records to clear.

#### innercompactArray(arr)

lib/msofficegen.js, line 104
  Compact the given array. This function compacting the given array.

  Name | Type | Description
  --- | --- | ---
  `arr` | object | The array to compact.

#### innergetCurDateTimeForOffice()

lib/msofficegen.js, line 78
  Generate string of the current date and time. This method generating a string with the current date and time in Office XML format.

  ##### Returns:

  String of the current date and time in Office XML format.