Quantcast
Viewing all 1288 articles
Browse latest View live

WebExtension.WebExtensionPropertyBag.Append()

I want to populate 'Office.context.document.settings' from DotNet code. Through the XML SDK I can read the settings from document.WebExTaskpanesPart.WebExtensionParts.FirstOrDefault().WebExtension.WebExtensionPropertyBag, but how do I add a 'Setting' ?

WebExtensionPropertyBag is an enumeraltion of OpenXmlElement, so I though WebExtensionPropertyBag.Append() would do it, but OpenXmlElement doesn't support 'new OpenXmlElement()'. So how do you use WebExtensionPropertyBag.Append() ?

Ron.


Getting error: The file contains corrupted data?? openxml packaging wordprocessing document?

hi

Am trying to open an xml file from a word document and modify parts and save it back as a word doc

public partial class Form1 : Form { string filepath = ".snip...\\documents\\visual studio 2013\\Projects\\WindowsFormsApplication1\\WindowsFormsApplication1\\xm.xml"; WordprocessingDocument wordprocdocmnt; // = new WordprocessingDocument(); object doc1; public Form1() { InitializeComponent(); try { wordprocdocmnt = WordprocessingDocument.Open(filepath, true); } catch (Exception ex) { MessageBox.Show("error opening document: " + ex.ToString()); } Body body = wordprocdocmnt.MainDocumentPart.Document.Body; }


the part in the try section fails saying system.io.fileformatexception: file contains corrupted data.  at MS.internal.IO.Zip.ZipIOEndofCentralDirectoryBlock.SeekableLoad(...

I look this up and find that my xml file is not in the proper format, use the OpenXML SDK 2.5 tool?  no, it says file is corrupted.  this is the xml file from a word doc and i just want to treat various parts of the xml as variables to write my own values.

so if the sdk 2.5 tool can see the xml then my code probably will too but how to get there from here?? thanks

References aren't recognized by C# compiler

I'm attempting to use the Open XML SDK with visual studio 2015. My goal is to create a workbook that has an externally loaded image. I've added a reference to the package I'm using (DocumentFormat.openXML), and when I'm in visual studio, there are no apparent errors. However, when I attempt to compile or run the program, I get messages saying that I am missing a reference to DocumentFormat and all other Open XML packages. I've already added the reference, so what could I be doing wrong?

It may be worth noting that Visual Studio is installed across multiple drives but that doesn't seem like an issue. 

Is there a way to directly access and modify Content Controls?

hi

I want to access and modify just the parts of the docx document that i setup in developer mode, the goal is to find a statement similar to using select controls by tag?

this is an example of a visual basic or VBA code snippet, Im using c# in asp.net/mvc web app; but the goal is to have a mechanism to accurately and reliably modify the fields of "text content" that i have assigned properties to, the code example is from:

Content Control Grouping & Navigation

the goal is to have a method that i can pass the field name and its new string value to and save the document.  there is a reference document that never changes, its always used as a base document.   

my hopeful method is UpdateField, the unknown Microsoft or openXml method that would define a new control of type text is 

DocumentControlItem(Text)

WordDocumentType mydocument;

public void UpdateField(document, string fieldname, string value){

myTxtcontrol DocumentControlitem  = new DocumentControlItem(Text);
myTxtcontrol = document.SelectContentControlsByTag(fieldname)
}

so is there a way to open the word document and be able to access the fields this way, such as the text controls that were pre defined and saved?

Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
  Select Case ContentControl.Tag'"Last" = tag property applied to the last control.
    Case "Last"'"First" = tag property applied to the first control.
       ActiveDocument.SelectContentControlsByTag("First").Item(1).Range.Select
  End Select
lbl_Exit:
  Exit Sub

Word 2007 Content Control Toolkit and schemas

I've been using the Word 2007 Content Control Toolkit and I've found it a huge help. But there's one thing I'd like to know: how can someone access and work with the Parts it's created in a document if they don't have the toolkit? That is, has it created proper schemas in some place, and how do I find them?

Track Changes

I am trying to implement Revisions as part of a web application that I'm working on.

We have a webform to capture data. These data need to be available in MS Word doc created. However, the added text should be in revision mode so that the admin can accept or reject based on some criteria.

We are able to put the text but some it is not being captured as part of rivision. The track changes is already turned on. Please help me.

Regards,

Matri.

Add vector image inside docx

Hello,

We need to find a better way of generating images that are added to Word documents (.docx).

The images are created from WPF Geometries, containing some texts too.

Currently, our code render these geometries as bitmap (.png) images and add them to the document. But this is no good for large documents.

We think that creating vector images instead of rasterized ones is the way to go.

What would be the best approach to convert from WPF Geometries to something I can add to .docx documents?

Thank you,

Igor. 


.NET Software developer for industrial internet and automation system.

How to derive v:formulas tag under equations manually for water mark text and grouped shapes?

Hi All,

Can you all help me to how to generate the vml equations for the particular shape (or) grouped shapes with known css style.

Is it possible?

Thanks,

Pradeep L



Is it possible to generate the vml path and equations manually for css style refered in shape element?

Hi All,

I have to render the water mark text as shape for word document to image conversion. While i am checking with remove the path and equations from document level, i can see the same watermark text in word document with that referred css style.

Is it possible to generate the graphics path based on css style alone? or able to generate vml equations manually by given css style information?

Take a look of the snapshot for css style and path equations:

Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

I need to to do all the rendering works with GDI+.

Thanks,

Pradeep L


Open XML SDK : How to convert open xml string to word document c#

Hello,

I am reading one element from code and I am getting Open XML string as a result.

  byte[] binary = Convert.FromBase64String(template.Attributes["body"].ToString());
  string bodyContent = UnicodeEncoding.UTF8.GetString(binary);

Resultant XML String:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><?mso-application progid="Word.Document"?><w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2003/wordml"
								xmlns:v="urn:schemas-microsoft-com:vml"
								xmlns:w10="urn:schemas-microsoft-com:office:word"
								xmlns:sl="http://schemas.microsoft.com/schemaLibrary/2003/core"
								xmlns:aml="http://schemas.microsoft.com/aml/2001/core"
								xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint"
								xmlns:o="urn:schemas-microsoft-com:office:office"
								xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"
								xmlns:wsp="http://schemas.microsoft.com/office/word/2003/wordml/sp2"
								w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve"><w:ignoreElements w:val="http://schemas.microsoft.com/office/word/2003/wordml/sp2"/><o:DocumentProperties><o:Title>Follow-up to Our Meeting</o:Title><o:Author>Microsoft Corporation</o:Author><o:LastAuthor>ASI User</o:LastAuthor><o:Revision>2</o:Revision><o:TotalTime>0</o:TotalTime><o:Created>2007-08-10T16:40:00Z</o:Created><o:LastSaved>2007-08-10T16:40:00Z</o:LastSaved><o:Pages>1</o:Pages><o:Words>178</o:Words><o:Characters>1019</o:Characters><o:Company>Microsoft Corporation</o:Company><o:Lines>8</o:Lines><o:Paragraphs>2</o:Paragraphs><o:CharactersWithSpaces>1195</o:CharactersWithSpaces><o:Version>11.8134</o:Version></o:DocumentProperties><w:fonts><w:defaultFonts w:ascii="Times New Roman" w:fareast="SimSun" w:h-ansi="Times New Roman" w:cs="Times New Roman"/><w:font w:name="SimSun"><w:altName w:val="宋体"/><w:panose-1 w:val="02010600030101010101"/><w:charset w:val="86"/><w:family w:val="Auto"/><w:pitch w:val="variable"/><w:sig w:usb-0="00000003" w:usb-1="080E0000" w:usb-2="00000010" w:usb-3="00000000" w:csb-0="00040001" w:csb-1="00000000"/></w:font><w:font w:name="@SimSun"><w:panose-1 w:val="02010600030101010101"/><w:charset w:val="86"/><w:family w:val="Auto"/><w:pitch w:val="variable"/><w:sig w:usb-0="00000003" w:usb-1="080E0000" w:usb-2="00000010" w:usb-3="00000000" w:csb-0="00040001" w:csb-1="00000000"/></w:font></w:fonts><w:styles><w:versionOfBuiltInStylenames w:val="4"/><w:latentStyles w:defLockedState="off" w:latentStyleCount="156"/><w:style w:type="paragraph" w:default="on" w:styleId="Normal"><w:name w:val="Normal"/><w:rPr><wx:font wx:val="Times New Roman"/><w:sz w:val="24"/><w:sz-cs w:val="24"/><w:lang w:val="EN-US" w:fareast="ZH-CN" w:bidi="AR-SA"/></w:rPr></w:style><w:style w:type="character" w:default="on" w:styleId="DefaultParagraphFont"><w:name w:val="Default Paragraph Font"/><w:semiHidden/></w:style><w:style w:type="table" w:default="on" w:styleId="TableNormal"><w:name w:val="Normal Table"/><wx:uiName wx:val="Table Normal"/><w:semiHidden/><w:rPr><wx:font wx:val="Times New Roman"/></w:rPr><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="list" w:default="on" w:styleId="NoList"><w:name w:val="No List"/><w:semiHidden/></w:style></w:styles><w:docPr><w:view w:val="print"/><w:zoom w:percent="100"/><w:doNotEmbedSystemFonts/><w:attachedTemplate w:val=""/><w:defaultTabStop w:val="720"/><w:characterSpacingControl w:val="DontCompress"/><w:optimizeForBrowser/><w:validateAgainstSchema/><w:saveInvalidXML w:val="off"/><w:ignoreMixedContent w:val="off"/><w:alwaysShowPlaceholderText w:val="off"/><w:compat><w:breakWrappedTables/><w:snapToGridInCell/><w:wrapTextWithPunct/><w:useAsianBreakRules/><w:useWord2002TableStyleRules/><w:useFELayout/></w:compat><wsp:rsids><wsp:rsidRoot wsp:val="00453714"/><wsp:rsid wsp:val="00015B28"/><wsp:rsid wsp:val="000B1B9A"/><wsp:rsid wsp:val="000F4F6A"/><wsp:rsid wsp:val="0010045E"/><wsp:rsid wsp:val="0015095E"/><wsp:rsid wsp:val="0016480E"/><wsp:rsid wsp:val="001B029C"/><wsp:rsid wsp:val="00386D53"/><wsp:rsid wsp:val="003F1099"/><wsp:rsid wsp:val="00453714"/><wsp:rsid wsp:val="004C6C19"/><wsp:rsid wsp:val="004F592D"/><wsp:rsid wsp:val="00511DC8"/><wsp:rsid wsp:val="00583473"/><wsp:rsid wsp:val="005A28AE"/><wsp:rsid wsp:val="005C0D45"/><wsp:rsid wsp:val="005E0E9D"/><wsp:rsid wsp:val="00670858"/><wsp:rsid wsp:val="006C08B9"/><wsp:rsid wsp:val="006C5DCC"/><wsp:rsid wsp:val="007F7DB8"/><wsp:rsid wsp:val="0083137D"/><wsp:rsid wsp:val="009E707D"/><wsp:rsid wsp:val="00AA38F5"/><wsp:rsid wsp:val="00BC08A1"/><wsp:rsid wsp:val="00C0384D"/><wsp:rsid wsp:val="00DE6B6B"/><wsp:rsid wsp:val="00E23D4E"/><wsp:rsid wsp:val="00EA0411"/><wsp:rsid wsp:val="00EB12F6"/></wsp:rsids></w:docPr><w:body><wx:sect><w:p wsp:rsidR="001B029C" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="00386D53"><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="begin"/></w:r><w:r wsp:rsidRPr="006C08B9"><w:instrText> MERGEFIELD "User_First_Name" </w:instrText></w:r><w:r wsp:rsidR="00670858"><w:instrText>\f" "</w:instrText></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="separate"/></w:r><w:r wsp:rsidR="004F592D"><w:rPr><w:noProof/></w:rPr><w:t>«User_First_Name» </w:t></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="end"/></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="begin"/></w:r><w:r wsp:rsidRPr="006C08B9"><w:instrText> MERGEFIELD "User_Last_Name" </w:instrText></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="separate"/></w:r><w:r wsp:rsidR="004F592D"><w:rPr><w:noProof/></w:rPr><w:t>«User_Last_Name»</w:t></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="end"/></w:r></w:p><w:p wsp:rsidR="00386D53" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="00386D53"><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="begin"/></w:r><w:r wsp:rsidRPr="006C08B9"><w:instrText> MERGEFIELD "User_Business_Unit" </w:instrText></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="separate"/></w:r><w:r wsp:rsidR="004F592D"><w:rPr><w:noProof/></w:rPr><w:t>«User_Business_Unit»</w:t></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="end"/></w:r></w:p><w:p wsp:rsidR="00386D53" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="00386D53"/><w:p wsp:rsidR="00386D53" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="0083137D"><w:r><w:fldChar w:fldCharType="begin"/></w:r><w:r><w:instrText> DATE  \@ "MMMM d, yyyy"  \* MERGEFORMAT </w:instrText></w:r><w:r><w:fldChar w:fldCharType="separate"/></w:r><w:r wsp:rsidR="0010045E"><w:rPr><w:noProof/></w:rPr><w:t>August 10, 2007</w:t></w:r><w:r><w:fldChar w:fldCharType="end"/></w:r></w:p><w:p wsp:rsidR="00386D53" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="00386D53"/><w:p wsp:rsidR="005E0E9D" wsp:rsidRDefault="00453714"><w:r><w:fldChar w:fldCharType="begin"/></w:r><w:r><w:instrText> ADDRESSBLOCK \f "&lt;&lt;_FIRST0_&gt;&gt;&lt;&lt; _LAST0_&gt;&gt;&lt;&lt; _SUFFIX0_&gt;&gt;</w:instrText></w:r><w:r><w:cr/><w:instrText>&lt;&lt;_STREET1_</w:instrText></w:r><w:r><w:cr/><w:instrText>&gt;&gt;&lt;&lt;_STREET2_</w:instrText></w:r><w:r><w:cr/><w:instrText>&gt;&gt;&lt;&lt;_CITY_&gt;&gt;&lt;&lt;, _STATE_&gt;&gt;&lt;&lt; _POSTAL_&gt;&gt;&lt;&lt;</w:instrText></w:r><w:r><w:cr/><w:instrText>_COUNTRY_&gt;&gt;" \l 1033 \c 1 \e "United States" \d </w:instrText></w:r><w:r><w:fldChar w:fldCharType="separate"/></w:r><w:r wsp:rsidR="004F592D"><w:rPr><w:noProof/></w:rPr><w:t>«AddressBlock»</w:t></w:r><w:r><w:fldChar w:fldCharType="end"/></w:r></w:p><w:p wsp:rsidR="00453714" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="00453714"/><w:p wsp:rsidR="00015B28" wsp:rsidRDefault="00453714" wsp:rsidP="00386D53"><w:r><w:fldChar w:fldCharType="begin"/></w:r><w:r><w:instrText> GREETINGLINE \f "&lt;&lt;_BEFORE_ Dear &gt;&gt;&lt;&lt;_TITLE0_&gt;&gt;&lt;&lt; _LAST0_&gt;&gt;&lt;&lt;_AFTER_ ,&gt;&gt;" \l 1033 \e "Dear Sir or Madam," </w:instrText></w:r><w:r><w:fldChar w:fldCharType="separate"/></w:r><w:r wsp:rsidR="004F592D"><w:rPr><w:noProof/></w:rPr><w:t>«GreetingLine»</w:t></w:r><w:r><w:fldChar w:fldCharType="end"/></w:r></w:p><w:p wsp:rsidR="00453714" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="00453714" wsp:rsidP="00386D53"/><w:p wsp:rsidR="006C08B9" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="006C08B9" wsp:rsidP="006C08B9"><w:r wsp:rsidRPr="006C08B9"><w:t>I would like to thank you for taking the time to meet with us. We were delighted to have the opportunity to discuss in more depth your needs and how our business unit can help you to fulfill them. As discussed, we will send you a detailed proposal soon and I will be in tou</w:t></w:r><w:r wsp:rsidR="005C0D45"><w:t>ch to schedule a follow-up meeting</w:t></w:r><w:r wsp:rsidRPr="006C08B9"><w:t> next month.</w:t></w:r></w:p><w:p wsp:rsidR="006C08B9" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="006C08B9" wsp:rsidP="006C08B9"/><w:p wsp:rsidR="006C08B9" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="006C08B9" wsp:rsidP="006C08B9"><w:r wsp:rsidRPr="006C08B9"><w:t>We look forward to the opportunity to work with you.</w:t></w:r></w:p><w:p wsp:rsidR="00386D53" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="00386D53" wsp:rsidP="00386D53"><w:pPr><w:ind w:left="720"/></w:pPr></w:p><w:p wsp:rsidR="00386D53" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="00386D53" wsp:rsidP="00386D53"><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="begin"/></w:r><w:r wsp:rsidRPr="006C08B9"><w:instrText> AUTOTEXTLIST  \s Closing \t "Right-click here to select from a list of standard closing salutations." \* MERGEFORMAT </w:instrText></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="separate"/></w:r><w:r wsp:rsidRPr="006C08B9"><w:t>Sincerely,</w:t></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="end"/></w:r></w:p><w:p wsp:rsidR="00386D53" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="00386D53" wsp:rsidP="00386D53"><w:pPr><w:ind w:left="720"/></w:pPr></w:p><w:p wsp:rsidR="001B029C" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="001B029C"><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="begin"/></w:r><w:r wsp:rsidRPr="006C08B9"><w:instrText> MERGEFIELD "User_First_Name" </w:instrText></w:r><w:r wsp:rsidR="00670858"><w:instrText>\f " "</w:instrText></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="separate"/></w:r><w:r wsp:rsidR="004F592D"><w:rPr><w:noProof/></w:rPr><w:t>«User_First_Name» </w:t></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="end"/></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="begin"/></w:r><w:r wsp:rsidRPr="006C08B9"><w:instrText> MERGEFIELD "User_Last_Name" </w:instrText></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="separate"/></w:r><w:r wsp:rsidR="004F592D"><w:rPr><w:noProof/></w:rPr><w:t>«User_Last_Name»</w:t></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="end"/></w:r></w:p><w:p wsp:rsidR="00386D53" wsp:rsidRPr="006C08B9" wsp:rsidRDefault="00386D53"><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="begin"/></w:r><w:r wsp:rsidRPr="006C08B9"><w:instrText> MERGEFIELD "User_Title" </w:instrText></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="separate"/></w:r><w:r wsp:rsidR="004F592D"><w:rPr><w:noProof/></w:rPr><w:t>«User_Title»</w:t></w:r><w:r wsp:rsidRPr="006C08B9"><w:fldChar w:fldCharType="end"/></w:r></w:p><w:sectPr wsp:rsidR="00386D53" wsp:rsidRPr="006C08B9"><w:pgSz w:w="12240" w:h="15840"/><w:pgMar w:top="1440" w:right="1800" w:bottom="1440" w:left="1800" w:header="720" w:footer="720" w:gutter="0"/><w:cols w:space="720"/><w:docGrid w:line-pitch="360"/></w:sectPr></wx:sect></w:body></w:wordDocument>

Now, I want to convert this string in memorystream so that it can be read by WordProcessingDocument as below:

using (MemoryStream stream = new MemoryStream())
  {
      stream.Write(binary, 0, (int)binary.Length);
        using (WordprocessingDocument wordDoc = wordprocessingDocument.Open(stream, true))
          {
                File.WriteAllBytes("C:\\data\\newFileName.docx", stream.ToArray());
           }
  }

Main purpose of doing this is :

1. I am reading one Mail Merge Template, which is in XML format.

2. I want to read all mergefields from that XML string and then replace it's values.

3. Finally, save that document as Word Document.

I am not able to find a way using Open XML SDK to do this.

Any suggestions?

Thank you,

Adding External Relationships

Hi all,

I'm fairly new to developing in office and I'm very new to the open office SDK. I'm attempting to use the SDK to add external relationships to an existing workbook. The reference doesn't provide any examples of how one might accomplish this. Can I add an external relationship to the workbook itself? Or does it need to be a specific drawing/worksheet/some other object? I'm just looking for some guidance as to how the AddExternalRelationship method is used and what has to be true of the spreadsheet for it to work without corrupting the file. 

Thanks!

How to find Excell cell colors using OpenXML

I need to find the background color of cells in an Excel file using OpenXML.

First I found the particular CellFormat of the cell and then the PatternFill.ForegroundColor..etc  using following code

Fill fill = (Fill)workbookPart.WorkbookStylesPart.Stylesheet.Fills.ChildElements[(int)cellFormat.FillId.Value];
var pf = fill.PatternFill;

DocumentFormat.OpenXml.Spreadsheet.ColorType ct = pf.ForegroundColor;

ct has following attributes

Auto , Indexed, RGB, Tint, Them

As I found, particular cell's color is there under one of above attributes. ( I referred  this as well http://stackoverflow.com/questions/10756206/getting-cell-backgroundcolor-in-excel-with-open-xml-2-0 )

some cell's colors were there under ct.RGb.Value which displayed as values with 8 hexavalues called HexaBinary and 

some cell's colors were there under   ct.tint.value  which displayed as a decimal value between 0 and 1
etc..
How to find the exact color using them?
How to convert those colors to known colors like hexadecimal html formatted colors?





 


Validating a Microsoft 2010 Word Document using OPEN XML agianst pre-defined XSD.

Hi,

I am preparaing a word 2010 High Level Application Design Documet with standard sections and content controls.

This document will be used as a template by all the application teams and we don't them to delete the sections in the document by missing certain design elements in High level design document.

So basically we need to valdiate the document that is filled out by the application team.(For example Infrastructure Guidelines,Application Security,Architecture styles etc.).

So how can i validate a word document(basically document.xml) against a XSD for the sections in the pre-defined template provided.

Finding Paragraphs by Style Name or Content in an Open XML Word Processing Document

Please help.




Thanks, Vijay Arockiasamy

Adding a picture to a document that already has picture

I'm trying to add a picture (with an external relationship) to a document. It works fine if the document is blank, but if there are already pictures in the document, then I get the following exception:

"Only one instance of this type is allowed for this parent."

The line that throws it is this one:

 DrawingsPart drawingsPart1 = UriPartDictionary["/xl/worksheets/sheet1.xml"].AddNewPart<DrawingsPart>("imgId1");

That's before I've added any external relationships. Why can you only have one DrawingsPart for an OpenXmlPart?

Thanks for any help

insert paragraph of texts in the powerpoint slide dynamically using openxml

Hi ,

i am new to open xml. i have some requirement for my project.

i need to insert text or paragraphs  in the powerpoint slide dynamically that is coming from excel sheet .

Excel is the source document which contains texts and paragraphs.

For example : sheet 1 contains the following information. i need to retrieve these informations and write it into the powerpoint presentation. if the text limit reaches the end of the slide it should automatically create a new slide.

Image may be NSFW.
Clik here to view.

Currently am able to read all the contents from excel sheet and i could load in the dataset. after loading the content in the dataset i dont know how to write the loaded contents in the presentation slide.

i created an empty presentation using openxml with PresentationParts,SlidePart,SlideLayoutPart,SlideMasterPart,Theme.

My Code:

public void generate_click(object sender, EventArgs e)
        {
            string scode = "C:\\Users\\302480\\Documents\\Visual Studio 2010\\Projects\\ppt\\ppt\\Source\\Excel_Source_ppt\\test.pptx";
            CreatePresentation(scode);
            sExcelPath = Server.MapPath("~/Source/Excel_Source_ppt/") + ConfigurationManager.AppSettings["TEMS_ppt"].ToString();
            sConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + sExcelPath + ".xlsx;Extended Properties=Excel 12.0";
            Get_WorkSheet_Names();
            Get_Excel_Data();
            foreach (DataTable table in dsSOW.Tables)
            {
                foreach (DataRow dr in table.Rows)
                {
                    no = dr.ItemArray[0].ToString();
                    desc = dr.ItemArray[1].ToString();
                    data = no+ " " + desc;
                }
            }
private void Get_WorkSheet_Names()
        {
            string sWorkSheetsColl = String.Empty;

                {
                    int iIndex = 0;
                    oConn = new OleDbConnection(sConnString);
                    oConn.Open();
                    dtList = oConn.GetSchema("Tables");
                    if (dtList != null)
                    {
                        dsSOW = new DataSet();
                        foreach (DataRow dr in dtList.Rows)
                        {
                            if (dr["TABLE_NAME"].ToString().ToLower() != "_xlnm#_filterdatabase")
                            {
                                dsSOW.Tables.Add(dr["TABLE_NAME"].ToString());
                                sWorkSheetsColl += dr["TABLE_NAME"].ToString() + ",";
                                iIndex++;
                            }
                        }
                        sWorkSheetsColl = sWorkSheetsColl.TrimEnd(',');
                        sWorkSheets = sWorkSheetsColl.Split(',');
                        dsSOW.AcceptChanges();
                    }
                }
            }
        private void Get_Excel_Data()
        {
                for (int i = 0; i < sWorkSheets.Length; i++)
                {
                    oCmd = new OleDbCommand("SELECT * FROM [" + sWorkSheets[i].TrimEnd() + "]", oConn);
                    oDa = new OleDbDataAdapter();
                    oDa.SelectCommand = oCmd;
                    oDa.Fill(dsSOW.Tables[sWorkSheets[i].ToString()]);
                }
                oConn.Close();
                dsSOW.AcceptChanges();
         }     

 

 

public static void CreatePresentation(string filepath) { // Create a presentation at a specified file path. The presentation document type is pptx, by default. PresentationDocument presentationDoc = PresentationDocument.Create(filepath, PresentationDocumentType.Presentation); PresentationPart presentationPart = presentationDoc.AddPresentationPart(); presentationPart.Presentation = new Presentation(); CreatePresentationParts(presentationPart); // Close the presentation handle presentationDoc.Close(); } private static void CreatePresentationParts(PresentationPart presentationPart) { SlideMasterIdList slideMasterIdList1 = new SlideMasterIdList(new SlideMasterId() { Id = (UInt32Value)2147483648U, RelationshipId = "rId1" }); SlideIdList slideIdList1 = new SlideIdList(new SlideId() { Id = (UInt32Value)256U, RelationshipId = "rId2" }); SlideSize slideSize1 = new SlideSize() { Cx = 9144000, Cy = 6858000, Type = SlideSizeValues.Screen4x3 }; NotesSize notesSize1 = new NotesSize() { Cx = 6858000, Cy = 9144000 }; DefaultTextStyle defaultTextStyle1 = new DefaultTextStyle(); presentationPart.Presentation.Append(slideMasterIdList1, slideIdList1, slideSize1, notesSize1, defaultTextStyle1); SlidePart slidePart1; SlideLayoutPart slideLayoutPart1; SlideMasterPart slideMasterPart1; ThemePart themePart1; slidePart1 = CreateSlidePart(presentationPart); slideLayoutPart1 = CreateSlideLayoutPart(slidePart1); slideMasterPart1 = CreateSlideMasterPart(slideLayoutPart1); themePart1 = CreateTheme(slideMasterPart1); slideMasterPart1.AddPart(slideLayoutPart1, "rId1"); presentationPart.AddPart(slideMasterPart1, "rId1"); presentationPart.AddPart(themePart1, "rId5"); } private static SlidePart CreateSlidePart(PresentationPart presentationPart) { SlidePart slidePart1 = presentationPart.AddNewPart<SlidePart>("rId2"); ImagePart imagePart = slidePart1.AddNewPart<ImagePart>("image/jpg", "rId2"); string filepath = @"C:\Users\302480\Documents\Visual Studio 2010\Projects\ppt\ppt\Source\Images\DDT.jpg"; FileStream stream = new FileStream(filepath, FileMode.Open); imagePart.FeedData(stream); stream.Close(); slidePart1.Slide = new Slide( new CommonSlideData( new ShapeTree( new P.NonVisualGroupShapeProperties( new P.NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }, new P.NonVisualGroupShapeDrawingProperties(), new ApplicationNonVisualDrawingProperties()), new GroupShapeProperties(new TransformGroup()), new P.Shape( new P.NonVisualShapeProperties( new P.NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "Title 1" }, new P.NonVisualShapeDrawingProperties(new ShapeLocks() { NoGrouping = true }), new ApplicationNonVisualDrawingProperties(new PlaceholderShape())), new P.ShapeProperties(), new P.TextBody( new BodyProperties(), new ListStyle(), new Paragraph(new EndParagraphRunProperties() { Language = "en-US" }))))), new ColorMapOverride(new MasterColorMapping())); P.Picture picture = new P.Picture(); P.BlipFill blipFill = new P.BlipFill(); D.Blip blip = new D.Blip() { Embed = "rId2" }; Stretch stretch = new Stretch(); FillRectangle fillRectangle = new FillRectangle(); stretch.Append(fillRectangle); blipFill.Append(blip); blipFill.Append(stretch); BlipExtensionList blipExtensionList1 = new BlipExtensionList(); BlipExtension blipExtension1 = new BlipExtension() { Uri = "{28A0092B-C50C-407E-A947-70E740481C1C}" }; UseLocalDpi useLocalDpi1 = new UseLocalDpi() { Val = false }; useLocalDpi1.AddNamespaceDeclaration("a14","http://schemas.microsoft.com/office/drawing/2010/main"); blipExtension1.Append(useLocalDpi1); blipExtensionList1.Append(blipExtension1); blip.Append(blipExtensionList1); picture.Append(blipFill); P.ShapeProperties shapeProperties1 = new P.ShapeProperties(); D.Transform2D transform2D1 = new D.Transform2D(); D.Offset offset1 = new D.Offset() { X = 667544L, Y = 648680L }; D.Extents extents1 = new D.Extents() { Cx = 5743848L, Cy = 4886743L }; transform2D1.Append(offset1); transform2D1.Append(extents1); D.PresetGeometry presetGeometry1 = new D.PresetGeometry() { Preset = D.ShapeTypeValues.Rectangle }; D.AdjustValueList adjustValueList1 = new D.AdjustValueList(); presetGeometry1.Append(adjustValueList1); shapeProperties1.Append(transform2D1); shapeProperties1.Append(presetGeometry1); picture.Append(shapeProperties1); slidePart1.Slide.CommonSlideData.ShapeTree.Append(picture); return slidePart1; } private static SlideLayoutPart CreateSlideLayoutPart(SlidePart slidePart1) { SlideLayoutPart slideLayoutPart1 = slidePart1.AddNewPart<SlideLayoutPart>("rId1"); SlideLayout slideLayout = new SlideLayout( new CommonSlideData(new ShapeTree( new P.NonVisualGroupShapeProperties( new P.NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }, new P.NonVisualGroupShapeDrawingProperties(), new ApplicationNonVisualDrawingProperties()), new GroupShapeProperties(new TransformGroup()), new P.Shape( new P.NonVisualShapeProperties( new P.NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "" }, new P.NonVisualShapeDrawingProperties(new ShapeLocks() { NoGrouping = true }), new ApplicationNonVisualDrawingProperties(new PlaceholderShape())), new P.ShapeProperties(), new P.TextBody( new BodyProperties(), new ListStyle(), new Paragraph(new EndParagraphRunProperties()))))), new ColorMapOverride(new MasterColorMapping())); slideLayoutPart1.SlideLayout = slideLayout; return slideLayoutPart1; } private static SlideMasterPart CreateSlideMasterPart(SlideLayoutPart slideLayoutPart1) { SlideMasterPart slideMasterPart1 = slideLayoutPart1.AddNewPart<SlideMasterPart>("rId1"); SlideMaster slideMaster = new SlideMaster( new CommonSlideData(new ShapeTree( new P.NonVisualGroupShapeProperties( new P.NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }, new P.NonVisualGroupShapeDrawingProperties(), new ApplicationNonVisualDrawingProperties()), new GroupShapeProperties(new TransformGroup()), new P.Shape( new P.NonVisualShapeProperties( new P.NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "Title Placeholder 1" }, new P.NonVisualShapeDrawingProperties(new ShapeLocks() { NoGrouping = true }), new ApplicationNonVisualDrawingProperties(new PlaceholderShape() { Type = PlaceholderValues.Title })), new P.ShapeProperties(), new P.TextBody( new BodyProperties(), new ListStyle(), new Paragraph())))), new P.ColorMap() { Background1 = D.ColorSchemeIndexValues.Light1, Text1 = D.ColorSchemeIndexValues.Dark1, Background2 = D.ColorSchemeIndexValues.Light2, Text2 = D.ColorSchemeIndexValues.Dark2, Accent1 = D.ColorSchemeIndexValues.Accent1, Accent2 = D.ColorSchemeIndexValues.Accent2, Accent3 = D.ColorSchemeIndexValues.Accent3, Accent4 = D.ColorSchemeIndexValues.Accent4, Accent5 = D.ColorSchemeIndexValues.Accent5, Accent6 = D.ColorSchemeIndexValues.Accent6, Hyperlink = D.ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = D.ColorSchemeIndexValues.FollowedHyperlink }, new SlideLayoutIdList(new SlideLayoutId() { Id = (UInt32Value)2147483649U, RelationshipId = "rId1" }), new TextStyles(new TitleStyle(), new BodyStyle(), new OtherStyle())); slideMasterPart1.SlideMaster = slideMaster; return slideMasterPart1; } private static ThemePart CreateTheme(SlideMasterPart slideMasterPart1) { ThemePart themePart1 = slideMasterPart1.AddNewPart<ThemePart>("rId5"); D.Theme theme1 = new D.Theme() { Name = "Office Theme" }; D.ThemeElements themeElements1 = new D.ThemeElements( new D.ColorScheme( new D.Dark1Color(new D.SystemColor() { Val = D.SystemColorValues.WindowText, LastColor = "000000" }), new D.Light1Color(new D.SystemColor() { Val = D.SystemColorValues.Window, LastColor = "FFFFFF" }), new D.Dark2Color(new D.RgbColorModelHex() { Val = "1F497D" }), new D.Light2Color(new D.RgbColorModelHex() { Val = "EEECE1" }), new D.Accent1Color(new D.RgbColorModelHex() { Val = "4F81BD" }), new D.Accent2Color(new D.RgbColorModelHex() { Val = "C0504D" }), new D.Accent3Color(new D.RgbColorModelHex() { Val = "9BBB59" }), new D.Accent4Color(new D.RgbColorModelHex() { Val = "8064A2" }), new D.Accent5Color(new D.RgbColorModelHex() { Val = "4BACC6" }), new D.Accent6Color(new D.RgbColorModelHex() { Val = "F79646" }), new D.Hyperlink(new D.RgbColorModelHex() { Val = "0000FF" }), new D.FollowedHyperlinkColor(new D.RgbColorModelHex() { Val = "800080" })) { Name = "Office" }, new D.FontScheme( new D.MajorFont( new D.LatinFont() { Typeface = "Calibri" }, new D.EastAsianFont() { Typeface = "" }, new D.ComplexScriptFont() { Typeface = "" }), new D.MinorFont( new D.LatinFont() { Typeface = "Calibri" }, new D.EastAsianFont() { Typeface = "" }, new D.ComplexScriptFont() { Typeface = "" })) { Name = "Office" }, new D.FormatScheme( new D.FillStyleList( new D.SolidFill(new D.SchemeColor() { Val = D.SchemeColorValues.PhColor }), new D.GradientFill( new D.GradientStopList( new D.GradientStop(new D.SchemeColor(new D.Tint() { Val = 50000 }, new D.SaturationModulation() { Val = 300000 }) { Val = D.SchemeColorValues.PhColor }) { Position = 0 }, new D.GradientStop(new D.SchemeColor(new D.Tint() { Val = 37000 }, new D.SaturationModulation() { Val = 300000 }) { Val = D.SchemeColorValues.PhColor }) { Position = 35000 }, new D.GradientStop(new D.SchemeColor(new D.Tint() { Val = 15000 }, new D.SaturationModulation() { Val = 350000 }) { Val = D.SchemeColorValues.PhColor }) { Position = 100000 } ), new D.LinearGradientFill() { Angle = 16200000, Scaled = true }), new D.NoFill(), new D.PatternFill(), new D.GroupFill()), new D.LineStyleList( new D.Outline( new D.SolidFill( new D.SchemeColor( new D.Shade() { Val = 95000 }, new D.SaturationModulation() { Val = 105000 }) { Val = D.SchemeColorValues.PhColor }), new D.PresetDash() { Val = D.PresetLineDashValues.Solid }) { Width = 9525, CapType = D.LineCapValues.Flat, CompoundLineType = D.CompoundLineValues.Single, Alignment = D.PenAlignmentValues.Center }, new D.Outline( new D.SolidFill( new D.SchemeColor( new D.Shade() { Val = 95000 }, new D.SaturationModulation() { Val = 105000 }) { Val = D.SchemeColorValues.PhColor }), new D.PresetDash() { Val = D.PresetLineDashValues.Solid }) { Width = 9525, CapType = D.LineCapValues.Flat, CompoundLineType = D.CompoundLineValues.Single, Alignment = D.PenAlignmentValues.Center }, new D.Outline( new D.SolidFill( new D.SchemeColor( new D.Shade() { Val = 95000 }, new D.SaturationModulation() { Val = 105000 }) { Val = D.SchemeColorValues.PhColor }), new D.PresetDash() { Val = D.PresetLineDashValues.Solid }) { Width = 9525, CapType = D.LineCapValues.Flat, CompoundLineType = D.CompoundLineValues.Single, Alignment = D.PenAlignmentValues.Center }), new D.EffectStyleList( new D.EffectStyle( new D.EffectList( new D.OuterShadow( new D.RgbColorModelHex( new D.Alpha() { Val = 38000 }) { Val = "000000" }) { BlurRadius = 40000L, Distance = 20000L, Direction = 5400000, RotateWithShape = false })), new D.EffectStyle( new D.EffectList( new D.OuterShadow( new D.RgbColorModelHex( new D.Alpha() { Val = 38000 }) { Val = "000000" }) { BlurRadius = 40000L, Distance = 20000L, Direction = 5400000, RotateWithShape = false })), new D.EffectStyle( new D.EffectList( new D.OuterShadow( new D.RgbColorModelHex( new D.Alpha() { Val = 38000 }) { Val = "000000" }) { BlurRadius = 40000L, Distance = 20000L, Direction = 5400000, RotateWithShape = false }))), new D.BackgroundFillStyleList( new D.SolidFill(new D.SchemeColor() { Val = D.SchemeColorValues.PhColor }), new D.GradientFill( new D.GradientStopList( new D.GradientStop( new D.SchemeColor(new D.Tint() { Val = 50000 }, new D.SaturationModulation() { Val = 300000 }) { Val = D.SchemeColorValues.PhColor }) { Position = 0 }, new D.GradientStop( new D.SchemeColor(new D.Tint() { Val = 50000 }, new D.SaturationModulation() { Val = 300000 }) { Val = D.SchemeColorValues.PhColor }) { Position = 0 }, new D.GradientStop( new D.SchemeColor(new D.Tint() { Val = 50000 }, new D.SaturationModulation() { Val = 300000 }) { Val = D.SchemeColorValues.PhColor }) { Position = 0 }), new D.LinearGradientFill() { Angle = 16200000, Scaled = true }), new D.GradientFill( new D.GradientStopList( new D.GradientStop( new D.SchemeColor(new D.Tint() { Val = 50000 }, new D.SaturationModulation() { Val = 300000 }) { Val = D.SchemeColorValues.PhColor }) { Position = 0 }, new D.GradientStop( new D.SchemeColor(new D.Tint() { Val = 50000 }, new D.SaturationModulation() { Val = 300000 }) { Val = D.SchemeColorValues.PhColor }) { Position = 0 }), new D.LinearGradientFill() { Angle = 16200000, Scaled = true }))) { Name = "Office" }); theme1.Append(themeElements1); theme1.Append(new D.ObjectDefaults()); theme1.Append(new D.ExtraColorSchemeList()); themePart1.Theme = theme1; return themePart1; }


Thanks !

banu


banupriya



How to add InkML into word by PIA

I have add a CustomXMLPart into a word document, the XML data is a inkML.

refer to https://msdn.microsoft.com/en-us/library/bb608612.aspx

But the data can't be seen in word when I open it.

Need it  band to any content control or other object ? what type content control/object need I create? 


Relationship Transform Algorithm Issue

Hi,

I need some help in transforming and canonicalization of Office XML relationship file mentioned in title i.e. Document.xml.rels

I have seen that in the final signature file in OOXML Package, in which this document is referred i.e _xmlsignatures\sig1.xml

the document.xml.rels is mentioned like this:

<Reference URI="/word/_rels/document.xml.rels?ContentType=application/vnd.openxmlformats-package.relationships+xml"><Transforms><Transform Algorithm="http://schemas.openxmlformats.org/package/2006/RelationshipTransform"><mdssi:RelationshipReference SourceId="rId13"/><mdssi:RelationshipReference SourceId="rId18"/><mdssi:RelationshipReference SourceId="rId26"/><mdssi:RelationshipReference SourceId="rId39"/><mdssi:RelationshipReference SourceId="rId21"/><mdssi:RelationshipReference SourceId="rId34"/><mdssi:RelationshipReference SourceId="rId42"/><mdssi:RelationshipReference SourceId="rId47"/><mdssi:RelationshipReference SourceId="rId50"/><mdssi:RelationshipReference SourceId="rId55"/><mdssi:RelationshipReference SourceId="rId7"/><mdssi:RelationshipReference SourceId="rId12"/><mdssi:RelationshipReference SourceId="rId17"/><mdssi:RelationshipReference SourceId="rId25"/><mdssi:RelationshipReference SourceId="rId33"/><mdssi:RelationshipReference SourceId="rId38"/><mdssi:RelationshipReference SourceId="rId46"/><mdssi:RelationshipReference SourceId="rId16"/><mdssi:RelationshipReference SourceId="rId20"/><mdssi:RelationshipReference SourceId="rId29"/><mdssi:RelationshipReference SourceId="rId41"/><mdssi:RelationshipReference SourceId="rId54"/><mdssi:RelationshipReference SourceId="rId11"/><mdssi:RelationshipReference SourceId="rId24"/><mdssi:RelationshipReference SourceId="rId32"/><mdssi:RelationshipReference SourceId="rId37"/><mdssi:RelationshipReference SourceId="rId40"/><mdssi:RelationshipReference SourceId="rId45"/><mdssi:RelationshipReference SourceId="rId53"/><mdssi:RelationshipReference SourceId="rId15"/><mdssi:RelationshipReference SourceId="rId23"/><mdssi:RelationshipReference SourceId="rId28"/><mdssi:RelationshipReference SourceId="rId36"/><mdssi:RelationshipReference SourceId="rId49"/><mdssi:RelationshipReference SourceId="rId10"/><mdssi:RelationshipReference SourceId="rId19"/><mdssi:RelationshipReference SourceId="rId31"/><mdssi:RelationshipReference SourceId="rId44"/><mdssi:RelationshipReference SourceId="rId52"/><mdssi:RelationshipReference SourceId="rId9"/><mdssi:RelationshipReference SourceId="rId14"/><mdssi:RelationshipReference SourceId="rId22"/><mdssi:RelationshipReference SourceId="rId27"/><mdssi:RelationshipReference SourceId="rId30"/><mdssi:RelationshipReference SourceId="rId35"/><mdssi:RelationshipReference SourceId="rId43"/><mdssi:RelationshipReference SourceId="rId48"/><mdssi:RelationshipReference SourceId="rId8"/><mdssi:RelationshipReference SourceId="rId51"/></Transform><Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/></Transforms><DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/><DigestValue>OUXcZjyg0v3dbMCu6fSq/ws2VEc=</DigestValue></Reference></Manifest>

i need to know how Office has generated this output along with resulting hash i.e. "OUXcZjyg0v3dbMCu6fSq/ws2VEc=".

What i am doing is as follows:

1) Firstly removing all the nodes of Custom Xml from Document.xml.rels

2) Canonicalization of the resulting XML (using an sdk)

3) Generating Hash of the Resulting XML ( using C# library)

but i never get the same hash as mentioned above.

Please guide me what i am missing 

OR guide me how to transform n canonicalize the document to get the mentioned hash???




Apply or set font size,font name for particular style using open XML in C#.net or VB.NET

Hi,

I have word document.In that document has many style(like normal,heading1,heading2 etc).I want to Apply font size,font name for particular style using open XML.For example i want to apply font size,font name for normal style in that document using open XML in c#.net or vb.net.please provide solution....

Range concept in OpenXML for word automation using .net

Hi,

I have convert word automation with open Xml technology.I have add some word templates to single word document and populate values to fields in that document.in following scenario if single values for make,model,serial,year,nnumber and seat fields then no problem for populate values to that field.but if more than one values available for that fields then i need to copy that particular range and paste below with table and populate values to that field.Dynamically how to populate for more than value (See image below) to single field with loop using openXML?How to implement above scenario? please provide solution

For template:

Image may be NSFW.
Clik here to view.

For Multiple value:

Image may be NSFW.
Clik here to view.

For Single Value:

Image may be NSFW.
Clik here to view.


Finding the position of chart labels

I have an application that allows users (among other things) to align objects to chart labels.  This app was originally written to function in COM where I was able to ask PowerPoint for Label.Left and Label.Top to get the position.  I have rewritten this app to work natively on the OpenXML files (.pptx, xlsx etc) and to my dismay it seems that the OpenXML does not store the label position - obviously it is dynamically rendered at display time by PowerPoint.

What I was looking for would have been in the Chart Part "/ppt/charts/chartn.xml" and would have been something like (for a Bar Chart):

/c:chartSpace/c:chart/c:plotArea/c:barChart/c:ser/c:dLbls/c:dLbl/p:xfrm with a:off and a:ext nodes. (Obviously the xfrm would have been in the c namespace).

Can you help me with any way to find out the X and Y position of the labels on a chart from the OpenXML?

TIA

Richard Teller

Viewing all 1288 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>