| public virtual void InsertAtBookmark(string toInsert, string bookmarkName) | public virtual void InsertAtBookmark(string toInsert, string bookmarkName) | ||||
| { | { | ||||
| if (String.IsNullOrWhiteSpace(bookmarkName)) | |||||
| if (bookmarkName.IsNullOrWhiteSpace()) | |||||
| throw new ArgumentException("bookmark cannot be null or empty", "bookmarkName"); | throw new ArgumentException("bookmark cannot be null or empty", "bookmarkName"); | ||||
| var headerCollection = Document.Headers; | var headerCollection = Document.Headers; |
| <AppDesignerFolder>Properties</AppDesignerFolder> | <AppDesignerFolder>Properties</AppDesignerFolder> | ||||
| <RootNamespace>Novacode</RootNamespace> | <RootNamespace>Novacode</RootNamespace> | ||||
| <AssemblyName>DocX</AssemblyName> | <AssemblyName>DocX</AssemblyName> | ||||
| <TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | |||||
| <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | |||||
| <FileAlignment>512</FileAlignment> | <FileAlignment>512</FileAlignment> | ||||
| <SccProjectName>SAK</SccProjectName> | <SccProjectName>SAK</SccProjectName> | ||||
| <SccLocalPath>SAK</SccLocalPath> | <SccLocalPath>SAK</SccLocalPath> |
| { | { | ||||
| public const string DOCUMENT_DOCUMENTTYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"; | public const string DOCUMENT_DOCUMENTTYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"; | ||||
| public const string TEMPLATE_DOCUMENTTYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml"; | public const string TEMPLATE_DOCUMENTTYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml"; | ||||
| public static bool IsNullOrWhiteSpace(this string value) | |||||
| { | |||||
| if (value == null) return true; | |||||
| return string.IsNullOrEmpty(value.Trim()); | |||||
| } | |||||
| /// <summary> | /// <summary> | ||||
| /// Checks whether 'toCheck' has all children that 'desired' has and values of 'val' attributes are the same | /// Checks whether 'toCheck' has all children that 'desired' has and values of 'val' attributes are the same | ||||
| /// </summary> | /// </summary> |
| <Language>en-US</Language> | <Language>en-US</Language> | ||||
| <HelpFileFormat>HtmlHelp1</HelpFileFormat> | <HelpFileFormat>HtmlHelp1</HelpFileFormat> | ||||
| <IndentHtml>False</IndentHtml> | <IndentHtml>False</IndentHtml> | ||||
| <FrameworkVersion>.NET Framework 4.0</FrameworkVersion> | |||||
| <FrameworkVersion>.NET Framework 3.5</FrameworkVersion> | |||||
| <KeepLogFile>True</KeepLogFile> | <KeepLogFile>True</KeepLogFile> | ||||
| <DisableCodeBlockComponent>False</DisableCodeBlockComponent> | <DisableCodeBlockComponent>False</DisableCodeBlockComponent> | ||||
| <CppCommentsFixup>False</CppCommentsFixup> | <CppCommentsFixup>False</CppCommentsFixup> |