Overblog Suivre ce blog
Editer l'article Administration Créer mon blog

Présentation

  • : Romagny13 - Du .NET,du pur .NET
  • Romagny13 - Du .NET,du pur .NET
  • : Cycle de progression Faire (quelque chose qui marche) -> comprendre ce que l’on fait/comment cela marche -> pousser plus loin les notions
  • Contact

Recherche

Articles Récents

21 juin 2007 4 21 /06 /juin /2007 10:30
[ OpenXml ]  – Créer un document Word 2007 (package) comprenant tous les fichiers et relations à partir de rien
 
J’utilise ici beaucoup LoadXml mais,d’autres posts sur OpenXml devraient arriver car je développe un outil pour justement mieux gérer ce format
   
private System.IO.Packaging.Package _Package;
 
        public System.IO.Packaging.Package Package
        {
            get { return _Package; }
            set { _Package = value; }
        }
 
#region create package
 
        public void CreateWordPackage(string PackageName)
        {
            Package = System.IO.Packaging.Package.Open(PackageName, System.IO.FileMode.Create);
            CreatedocPropsAppPackagePart();
            CreatedocPropsCorePackagePart();
            CreateWordDocumentPackagePart();
            CreateWordstylesPackagePart(); // 1
            CreateWordsettingsPackagePart(); // 2
            CreateWordwebSettingsPackagePart(); // 3
            CreateWordfonttablePackagePart(); // 4
            CreateWordthemestheme1PackagePart(); //5
        }
 
        #endregion
 
        #region docProps
 
        public void CreatedocPropsAppPackagePart()
        {
            System.IO.Packaging.PackagePart oPackagePart = Package.CreatePart(new Uri("/docProps/app.xml", UriKind.Relative), "application/vnd.openxmlformats-officedocument.extended-properties+xml");
            CreateDocument(oPackagePart, @"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><Properties xmlns=""http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"" xmlns:vt=""http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes""><Template>Normal.dotm</Template><TotalTime>0</TotalTime><Pages>1</Pages><Words>0</Words><Characters>0</Characters><Application>Microsoft Office Word</Application><DocSecurity>0</DocSecurity><Lines>1</Lines><Paragraphs>1</Paragraphs><ScaleCrop>false</ScaleCrop><Company></Company><LinksUpToDate>false</LinksUpToDate><CharactersWithSpaces>0</CharactersWithSpaces><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>12.0000</AppVersion></Properties>");
            Package.CreateRelationship(new Uri("docProps/app.xml", UriKind.Relative), System.IO.Packaging.TargetMode.Internal, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties");
        }
        public void CreatedocPropsCorePackagePart()
        {
            System.IO.Packaging.PackagePart oPackagePart = Package.CreatePart(new Uri("/docProps/core.xml", UriKind.Relative), "application/vnd.openxmlformats-package.core-properties+xml");
            CreateDocument(oPackagePart, @"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><cp:coreProperties xmlns:cp=""http://schemas.openxmlformats.org/package/2006/metadata/core-properties"" xmlns:dc=""http://purl.org/dc/elements/1.1/"" xmlns:dcterms=""http://purl.org/dc/terms/"" xmlns:dcmitype=""http://purl.org/dc/dcmitype/"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""><dc:title></dc:title><dc:subject></dc:subject><dc:creator>romagny</dc:creator><cp:keywords></cp:keywords><dc:description></dc:description><cp:lastModifiedBy>romagny</cp:lastModifiedBy><cp:revision>1</cp:revision><dcterms:created xsi:type=""dcterms:W3CDTF"">2007-06-21T07:32:00Z</dcterms:created><dcterms:modified xsi:type=""dcterms:W3CDTF"">2007-06-21T07:32:00Z</dcterms:modified></cp:coreProperties>");
            Package.CreateRelationship(new Uri("docProps/core.xml", UriKind.Relative), System.IO.Packaging.TargetMode.Internal, "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties");
        }
 
        #endregion docProps
 
        #region word
 
        public void CreateWordDocumentPackagePart()
        {
            System.IO.Packaging.PackagePart oPackagePart = Package.CreatePart(new Uri("/word/document.xml", UriKind.Relative), "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml");
            CreateDocument(oPackagePart, @"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><w:document xmlns:ve=""http://schemas.openxmlformats.org/markup-compatibility/2006"" xmlns:o=""urn:schemas-microsoft-com:office:office"" xmlns:r=""http://schemas.openxmlformats.org/officeDocument/2006/relationships"" xmlns:m=""http://schemas.openxmlformats.org/officeDocument/2006/math"" xmlns:v=""urn:schemas-microsoft-com:vml"" xmlns:wp=""http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing"" xmlns:w10=""urn:schemas-microsoft-com:office:word"" xmlns:w=""http://schemas.openxmlformats.org/wordprocessingml/2006/main"" xmlns:wne=""http://schemas.microsoft.com/office/word/2006/wordml""><w:body><w:p w:rsidR=""001A5467"" w:rsidRDefault=""001A5467"" /><w:sectPr w:rsidR=""001A5467"" w:rsidSect=""001A5467""><w:pgSz w:w=""11906"" w:h=""16838"" /><w:pgMar w:top=""1417"" w:right=""1417"" w:bottom=""1417"" w:left=""1417"" w:header=""708"" w:footer=""708"" w:gutter=""0"" /><w:cols w:space=""708"" /><w:docGrid w:linePitch=""360"" /></w:sectPr></w:body></w:document>");
            Package.CreateRelationship(new Uri("word/document.xml", UriKind.Relative), System.IO.Packaging.TargetMode.Internal, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument");
        }
        public void CreateWordstylesPackagePart()
        {
            System.IO.Packaging.PackagePart oPackagePart = Package.CreatePart(new Uri("/word/styles.xml", UriKind.Relative), "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml");
            CreateDocument(oPackagePart, @"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><w:styles xmlns:r=""http://schemas.openxmlformats.org/officeDocument/2006/relationships"" xmlns:w=""http://schemas.openxmlformats.org/wordprocessingml/2006/main""><w:docDefaults><w:rPrDefault><w:rPr><w:rFonts w:asciiTheme=""minorHAnsi"" w:eastAsiaTheme=""minorHAnsi"" w:hAnsiTheme=""minorHAnsi"" w:cstheme=""minorBidi""/><w:sz w:val=""22""/><w:szCs w:val=""22""/><w:lang w:val=""fr-FR"" w:eastAsia=""en-US"" w:bidi=""ar-SA""/></w:rPr></w:rPrDefault><w:pPrDefault><w:pPr><w:spacing w:after=""200"" w:line=""276"" w:lineRule=""auto""/></w:pPr></w:pPrDefault></w:docDefaults><w:latentStyles w:defLockedState=""0"" w:defUIPriority=""99"" w:defSemiHidden=""1"" w:defUnhideWhenUsed=""1"" w:defQFormat=""0"" w:count=""267""><w:lsdException w:name=""Normal"" w:semiHidden=""0"" w:uiPriority=""0"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""heading 1"" w:semiHidden=""0"" w:uiPriority=""9"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""heading 2"" w:uiPriority=""9"" w:qFormat=""1""/><w:lsdException w:name=""heading 3"" w:uiPriority=""9"" w:qFormat=""1""/><w:lsdException w:name=""heading 4"" w:uiPriority=""9"" w:qFormat=""1""/><w:lsdException w:name=""heading 5"" w:uiPriority=""9"" w:qFormat=""1""/><w:lsdException w:name=""heading 6"" w:uiPriority=""9"" w:qFormat=""1""/><w:lsdException w:name=""heading 7"" w:uiPriority=""9"" w:qFormat=""1""/><w:lsdException w:name=""heading 8"" w:uiPriority=""9"" w:qFormat=""1""/><w:lsdException w:name=""heading 9"" w:uiPriority=""9"" w:qFormat=""1""/><w:lsdException w:name=""toc 1"" w:uiPriority=""39""/><w:lsdException w:name=""toc 2"" w:uiPriority=""39""/><w:lsdException w:name=""toc 3"" w:uiPriority=""39""/><w:lsdException w:name=""toc 4"" w:uiPriority=""39""/><w:lsdException w:name=""toc 5"" w:uiPriority=""39""/><w:lsdException w:name=""toc 6"" w:uiPriority=""39""/><w:lsdException w:name=""toc 7"" w:uiPriority=""39""/><w:lsdException w:name=""toc 8"" w:uiPriority=""39""/><w:lsdException w:name=""toc 9"" w:uiPriority=""39""/><w:lsdException w:name=""caption"" w:uiPriority=""35"" w:qFormat=""1""/><w:lsdException w:name=""Title"" w:semiHidden=""0"" w:uiPriority=""10"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Default Paragraph Font"" w:uiPriority=""1""/><w:lsdException w:name=""Subtitle"" w:semiHidden=""0"" w:uiPriority=""11"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Strong"" w:semiHidden=""0"" w:uiPriority=""22"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Emphasis"" w:semiHidden=""0"" w:uiPriority=""20"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Table Grid"" w:semiHidden=""0"" w:uiPriority=""59"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Placeholder Text"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""No Spacing"" w:semiHidden=""0"" w:uiPriority=""1"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Light Shading"" w:semiHidden=""0"" w:uiPriority=""60"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light List"" w:semiHidden=""0"" w:uiPriority=""61"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Grid"" w:semiHidden=""0"" w:uiPriority=""62"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 1"" w:semiHidden=""0"" w:uiPriority=""63"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 2"" w:semiHidden=""0"" w:uiPriority=""64"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 1"" w:semiHidden=""0"" w:uiPriority=""65"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 2"" w:semiHidden=""0"" w:uiPriority=""66"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 1"" w:semiHidden=""0"" w:uiPriority=""67"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 2"" w:semiHidden=""0"" w:uiPriority=""68"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 3"" w:semiHidden=""0"" w:uiPriority=""69"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Dark List"" w:semiHidden=""0"" w:uiPriority=""70"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Shading"" w:semiHidden=""0"" w:uiPriority=""71"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful List"" w:semiHidden=""0"" w:uiPriority=""72"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Grid"" w:semiHidden=""0"" w:uiPriority=""73"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Shading Accent 1"" w:semiHidden=""0"" w:uiPriority=""60"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light List Accent 1"" w:semiHidden=""0"" w:uiPriority=""61"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Grid Accent 1"" w:semiHidden=""0"" w:uiPriority=""62"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 1 Accent 1"" w:semiHidden=""0"" w:uiPriority=""63"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 2 Accent 1"" w:semiHidden=""0"" w:uiPriority=""64"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 1 Accent 1"" w:semiHidden=""0"" w:uiPriority=""65"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Revision"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""List Paragraph"" w:semiHidden=""0"" w:uiPriority=""34"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Quote"" w:semiHidden=""0"" w:uiPriority=""29"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Intense Quote"" w:semiHidden=""0"" w:uiPriority=""30"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Medium List 2 Accent 1"" w:semiHidden=""0"" w:uiPriority=""66"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 1 Accent 1"" w:semiHidden=""0"" w:uiPriority=""67"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 2 Accent 1"" w:semiHidden=""0"" w:uiPriority=""68"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 3 Accent 1"" w:semiHidden=""0"" w:uiPriority=""69"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Dark List Accent 1"" w:semiHidden=""0"" w:uiPriority=""70"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Shading Accent 1"" w:semiHidden=""0"" w:uiPriority=""71"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful List Accent 1"" w:semiHidden=""0"" w:uiPriority=""72"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Grid Accent 1"" w:semiHidden=""0"" w:uiPriority=""73"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Shading Accent 2"" w:semiHidden=""0"" w:uiPriority=""60"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light List Accent 2"" w:semiHidden=""0"" w:uiPriority=""61"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Grid Accent 2"" w:semiHidden=""0"" w:uiPriority=""62"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 1 Accent 2"" w:semiHidden=""0"" w:uiPriority=""63"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 2 Accent 2"" w:semiHidden=""0"" w:uiPriority=""64"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 1 Accent 2"" w:semiHidden=""0"" w:uiPriority=""65"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 2 Accent 2"" w:semiHidden=""0"" w:uiPriority=""66"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 1 Accent 2"" w:semiHidden=""0"" w:uiPriority=""67"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 2 Accent 2"" w:semiHidden=""0"" w:uiPriority=""68"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 3 Accent 2"" w:semiHidden=""0"" w:uiPriority=""69"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Dark List Accent 2"" w:semiHidden=""0"" w:uiPriority=""70"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Shading Accent 2"" w:semiHidden=""0"" w:uiPriority=""71"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful List Accent 2"" w:semiHidden=""0"" w:uiPriority=""72"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Grid Accent 2"" w:semiHidden=""0"" w:uiPriority=""73"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Shading Accent 3"" w:semiHidden=""0"" w:uiPriority=""60"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light List Accent 3"" w:semiHidden=""0"" w:uiPriority=""61"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Grid Accent 3"" w:semiHidden=""0"" w:uiPriority=""62"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 1 Accent 3"" w:semiHidden=""0"" w:uiPriority=""63"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 2 Accent 3"" w:semiHidden=""0"" w:uiPriority=""64"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 1 Accent 3"" w:semiHidden=""0"" w:uiPriority=""65"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 2 Accent 3"" w:semiHidden=""0"" w:uiPriority=""66"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 1 Accent 3"" w:semiHidden=""0"" w:uiPriority=""67"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 2 Accent 3"" w:semiHidden=""0"" w:uiPriority=""68"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 3 Accent 3"" w:semiHidden=""0"" w:uiPriority=""69"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Dark List Accent 3"" w:semiHidden=""0"" w:uiPriority=""70"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Shading Accent 3"" w:semiHidden=""0"" w:uiPriority=""71"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful List Accent 3"" w:semiHidden=""0"" w:uiPriority=""72"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Grid Accent 3"" w:semiHidden=""0"" w:uiPriority=""73"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Shading Accent 4"" w:semiHidden=""0"" w:uiPriority=""60"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light List Accent 4"" w:semiHidden=""0"" w:uiPriority=""61"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Grid Accent 4"" w:semiHidden=""0"" w:uiPriority=""62"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 1 Accent 4"" w:semiHidden=""0"" w:uiPriority=""63"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 2 Accent 4"" w:semiHidden=""0"" w:uiPriority=""64"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 1 Accent 4"" w:semiHidden=""0"" w:uiPriority=""65"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 2 Accent 4"" w:semiHidden=""0"" w:uiPriority=""66"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 1 Accent 4"" w:semiHidden=""0"" w:uiPriority=""67"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 2 Accent 4"" w:semiHidden=""0"" w:uiPriority=""68"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 3 Accent 4"" w:semiHidden=""0"" w:uiPriority=""69"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Dark List Accent 4"" w:semiHidden=""0"" w:uiPriority=""70"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Shading Accent 4"" w:semiHidden=""0"" w:uiPriority=""71"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful List Accent 4"" w:semiHidden=""0"" w:uiPriority=""72"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Grid Accent 4"" w:semiHidden=""0"" w:uiPriority=""73"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Shading Accent 5"" w:semiHidden=""0"" w:uiPriority=""60"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light List Accent 5"" w:semiHidden=""0"" w:uiPriority=""61"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Grid Accent 5"" w:semiHidden=""0"" w:uiPriority=""62"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 1 Accent 5"" w:semiHidden=""0"" w:uiPriority=""63"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 2 Accent 5"" w:semiHidden=""0"" w:uiPriority=""64"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 1 Accent 5"" w:semiHidden=""0"" w:uiPriority=""65"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 2 Accent 5"" w:semiHidden=""0"" w:uiPriority=""66"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 1 Accent 5"" w:semiHidden=""0"" w:uiPriority=""67"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 2 Accent 5"" w:semiHidden=""0"" w:uiPriority=""68"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 3 Accent 5"" w:semiHidden=""0"" w:uiPriority=""69"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Dark List Accent 5"" w:semiHidden=""0"" w:uiPriority=""70"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Shading Accent 5"" w:semiHidden=""0"" w:uiPriority=""71"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful List Accent 5"" w:semiHidden=""0"" w:uiPriority=""72"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Grid Accent 5"" w:semiHidden=""0"" w:uiPriority=""73"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Shading Accent 6"" w:semiHidden=""0"" w:uiPriority=""60"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light List Accent 6"" w:semiHidden=""0"" w:uiPriority=""61"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Light Grid Accent 6"" w:semiHidden=""0"" w:uiPriority=""62"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 1 Accent 6"" w:semiHidden=""0"" w:uiPriority=""63"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Shading 2 Accent 6"" w:semiHidden=""0"" w:uiPriority=""64"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 1 Accent 6"" w:semiHidden=""0"" w:uiPriority=""65"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium List 2 Accent 6"" w:semiHidden=""0"" w:uiPriority=""66"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 1 Accent 6"" w:semiHidden=""0"" w:uiPriority=""67"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 2 Accent 6"" w:semiHidden=""0"" w:uiPriority=""68"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Medium Grid 3 Accent 6"" w:semiHidden=""0"" w:uiPriority=""69"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Dark List Accent 6"" w:semiHidden=""0"" w:uiPriority=""70"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Shading Accent 6"" w:semiHidden=""0"" w:uiPriority=""71"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful List Accent 6"" w:semiHidden=""0"" w:uiPriority=""72"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Colorful Grid Accent 6"" w:semiHidden=""0"" w:uiPriority=""73"" w:unhideWhenUsed=""0""/><w:lsdException w:name=""Subtle Emphasis"" w:semiHidden=""0"" w:uiPriority=""19"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Intense Emphasis"" w:semiHidden=""0"" w:uiPriority=""21"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Subtle Reference"" w:semiHidden=""0"" w:uiPriority=""31"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Intense Reference"" w:semiHidden=""0"" w:uiPriority=""32"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Book Title"" w:semiHidden=""0"" w:uiPriority=""33"" w:unhideWhenUsed=""0"" w:qFormat=""1""/><w:lsdException w:name=""Bibliography"" w:uiPriority=""37""/><w:lsdException w:name=""TOC Heading"" w:uiPriority=""39"" w:qFormat=""1""/></w:latentStyles><w:style w:type=""paragraph"" w:default=""1"" w:styleId=""Normal""><w:name w:val=""Normal""/><w:qFormat/><w:rsid w:val=""00934EB5""/></w:style><w:style w:type=""character"" w:default=""1"" w:styleId=""Policepardfaut""><w:name w:val=""Default Paragraph Font""/><w:uiPriority w:val=""1""/><w:semiHidden/><w:unhideWhenUsed/></w:style><w:style w:type=""table"" w:default=""1"" w:styleId=""TableauNormal""><w:name w:val=""Normal Table""/><w:uiPriority w:val=""99""/><w:semiHidden/><w:unhideWhenUsed/><w:qFormat/><w:tblPr><w:tblInd w:w=""0"" w:type=""dxa""/><w:tblCellMar><w:top w:w=""0"" w:type=""dxa""/><w:left w:w=""108"" w:type=""dxa""/><w:bottom w:w=""0"" w:type=""dxa""/><w:right w:w=""108"" w:type=""dxa""/></w:tblCellMar></w:tblPr></w:style><w:style w:type=""numbering"" w:default=""1"" w:styleId=""Aucuneliste""><w:name w:val=""No List""/><w:uiPriority w:val=""99""/><w:semiHidden/><w:unhideWhenUsed/></w:style></w:styles>");
            System.IO.Packaging.PackagePart DocumentRels = Package.GetPart(new Uri("/word/document.xml", UriKind.Relative));
            DocumentRels.CreateRelationship(new Uri("styles.xml", UriKind.Relative), System.IO.Packaging.TargetMode.Internal, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles");
        }
        public void CreateWordsettingsPackagePart()
        {
            System.IO.Packaging.PackagePart oPackagePart = Package.CreatePart(new Uri("/word/settings.xml", UriKind.Relative), "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml");
            CreateDocument(oPackagePart, @"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><w:settings xmlns:o=""urn:schemas-microsoft-com:office:office"" xmlns:r=""http://schemas.openxmlformats.org/officeDocument/2006/relationships"" xmlns:m=""http://schemas.openxmlformats.org/officeDocument/2006/math"" xmlns:v=""urn:schemas-microsoft-com:vml"" xmlns:w10=""urn:schemas-microsoft-com:office:word"" xmlns:w=""http://schemas.openxmlformats.org/wordprocessingml/2006/main"" xmlns:sl=""http://schemas.openxmlformats.org/schemaLibrary/2006/main""><w:zoom w:percent=""100""/><w:defaultTabStop w:val=""708""/><w:hyphenationZone w:val=""425""/><w:characterSpacingControl w:val=""doNotCompress""/><w:compat/><w:rsids><w:rsidRoot w:val=""00A918D7""/><w:rsid w:val=""00934EB5""/><w:rsid w:val=""00A918D7""/></w:rsids><m:mathPr><m:mathFont m:val=""Cambria Math""/><m:brkBin m:val=""before""/><m:brkBinSub m:val=""--""/><m:smallFrac m:val=""off""/><m:dispDef/><m:lMargin m:val=""0""/><m:rMargin m:val=""0""/><m:defJc m:val=""centerGroup""/><m:wrapIndent m:val=""1440""/><m:intLim m:val=""subSup""/><m:naryLim m:val=""undOvr""/></m:mathPr><w:themeFontLang w:val=""fr-FR""/><w:clrSchemeMapping w:bg1=""light1"" w:t1=""dark1"" w:bg2=""light2"" w:t2=""dark2"" w:accent1=""accent1"" w:accent2=""accent2"" w:accent3=""accent3"" w:accent4=""accent4"" w:accent5=""accent5"" w:accent6=""accent6"" w:hyperlink=""hyperlink"" w:followedHyperlink=""followedHyperlink""/><w:shapeDefaults><o:shapedefaults v:ext=""edit"" spidmax=""2050""/><o:shapelayout v:ext=""edit""><o:idmap v:ext=""edit"" data=""1""/></o:shapelayout></w:shapeDefaults><w:decimalSymbol w:val="",""/><w:listSeparator w:val="";""/></w:settings>");
            System.IO.Packaging.PackagePart DocumentRels = Package.GetPart(new Uri("/word/document.xml", UriKind.Relative));
            DocumentRels.CreateRelationship(new Uri("settings.xml", UriKind.Relative), System.IO.Packaging.TargetMode.Internal, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings");
        }
        public void CreateWordwebSettingsPackagePart()
        {
            System.IO.Packaging.PackagePart oPackagePart = Package.CreatePart(new Uri("/word/webSettings.xml", UriKind.Relative), "application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml");
            CreateDocument(oPackagePart, @"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><w:webSettings xmlns:r=""http://schemas.openxmlformats.org/officeDocument/2006/relationships"" xmlns:w=""http://schemas.openxmlformats.org/wordprocessingml/2006/main""><w:optimizeForBrowser/></w:webSettings>");
            System.IO.Packaging.PackagePart DocumentRels = Package.GetPart(new Uri("/word/document.xml", UriKind.Relative));
            DocumentRels.CreateRelationship(new Uri("webSettings.xml", UriKind.Relative), System.IO.Packaging.TargetMode.Internal, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings");
        }
        public void CreateWordfonttablePackagePart()
        {
            System.IO.Packaging.PackagePart oPackagePart = Package.CreatePart(new Uri("/word/fontTable.xml", UriKind.Relative), "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml");
            CreateDocument(oPackagePart, @"<?xml version=""1.0"" encoding=""UTF-8"" standalone=""yes""?><w:fonts xmlns:r=""http://schemas.openxmlformats.org/officeDocument/2006/relationships"" xmlns:w=""http://schemas.openxmlformats.org/wordprocessingml/2006/main""><w:font w:name=""Calibri""><w:panose1 w:val=""020F0502020204030204"" /><w:charset w:val=""00"" /><w:family w:val=""swiss"" /><w:pitch w:val=""variable"" /><w:sig w:usb0=""A00002EF"" w:usb1=""4000207B"" w:usb2=""00000000"" w:usb3=""00000000"" w:csb0=""0000009F"" w:csb1=""00000000"" /></w:font><w:font w:name=""Times New Roman""><w:panose1 w:val=""02020603050405020304"" /><w:charset w:val=""00"" /><w:family w:val=""roman"" /><w:pitch w:val=""variable"" /><w:sig w:usb0=""20002A87"" w:usb1=""80000000"" w:usb2=""00000008"" w:usb3=""00000000"" w:csb0=""000001FF"" w:csb1=""00000000"" /></w:font><w:font w:name=""Cambria""><w:panose1 w:val=""02040503050406030204"" /><w:charset w:val=""00"" /><w:family w:val=""roman"" /><w:pitch w:val=""variable"" /><w:sig w:usb0=""A00002EF"" w:usb1=""4000004B"" w:usb2=""00000000"" w:usb3=""00000000"" w:csb0=""0000009F"" w:csb1=""00000000"" /></w:font></w:fonts>");
            System.IO.Packaging.PackagePart DocumentRels = Package.GetPart(new Uri("/word/document.xml", UriKind.Relative));
            DocumentRels.CreateRelationship(new Uri("fontTable.xml", UriKind.Relative), System.IO.Packaging.TargetMode.Internal, "http://schemas.openxmlformats.org/officeDocument/2006/relationships/fontTable");
        }

Partager cet article

Repost 0
Published by Romagny13 - dans Office
commenter cet article

commentaires