'''' This code is part of Document Solutions for Word demos.'' Copyright (c) MESCIUS inc. All rights reserved.''ImportsSystem.IOImportsGrapeCity.Documents.Word '' The actual formatting of a specific content object in an MS Word document'' Is determined by a combination of several factors, such as direct formatting'' that may be applied to the object, the style associated with the object,'' as well as direct formatting And styles of the containing objects.'' '' This sample demonstrates the use of the GcWordDocument.GetPropertyValueSource()'' method that allows you to find the object that provides the actual current value'' of a style property (in this sample, the size of a font).'''' This sample uses the document from the SampleParagraphs sample.PublicClassGetStyleSourceFunctionCreateDocx() AsGcWordDocumentDim doc = NewGcWordDocument() doc.Load(Path.Combine("Resources", "WordDocs", "SampleParagraphs.docx")) '' Find the object that provides formatting for the first text run in this documentDim source = GcWordDocument.GetPropertyValueSource(Function() doc.Body.Runs.First.Font.Size) '' Add the info that we found to the document doc.Body.Paragraphs.Add($">>> The object that determines the font size of the first text run in this document Is '{source}'.")'' If the property source Is a style, add its nameIf source IsNotNothingAndAlso source.GetType() IsGetType(Style) Then doc.Body.Paragraphs.Add($">>> The object Is the style '{CType(source, Style).WordName}'.")EndIf Return docEndFunctionEndClass