def export_to_word(vuln_info, output_file_name, template=None):
    if not isinstance(vuln_info, list):
        raise TypeError("Expected list, got '%s' instead" % type(vuln_info))
    else:
        for x in vuln_info:
            if not isinstance(x, Vulnerability):
                raise TypeError("Expected Vulnerability, got '%s' instead" % type(x))
    if not isinstance(output_file_name, str):
        raise TypeError("Expected basestring, got '%s' instead" % type(output_file_name))
    else:
        if not output_file_name:
            raise ValueError("output_file_name must has a valid value.")
    if template is not None:
        if not isinstance(template, str):
            raise TypeError("Expected basestring, got '%s' instead" % type(template))
        if not template or not os.path.exists(template):
            raise ValueError("Template must has a valid value.")

    if template:
        doc_template = Document(template)

        # Get mark where insert tables
        p = paragraph_search("#####TABLE####", doc_template)
        if p is None:
            raise IOError("Incompatible document format. Can't find '#####TABLE####' in document.")
    else:
        p = Paragraph("")

    # Add table information
    create_tables(vuln_info, p)

    # Save doc
    doc = Document()
    # doc.add_paragraph(p)
    doc.save(output_file_name)


# ----------------------------------------------------------------------
[<channel>] [<user|nick>]
dataset/ETHPy150Open cr0hn/openvas_to_report/openvas_to_report/libs/exporters/word.py/export_to_word--crossover with--dataset/ETHPy150Open ProgVal/Limnoria/plugins/Herald/plugin.py/Herald.remove