c# WdInation Enumerationword 参数 页码等等.docx_第1页
c# WdInation Enumerationword 参数 页码等等.docx_第2页
c# WdInation Enumerationword 参数 页码等等.docx_第3页
c# WdInation Enumerationword 参数 页码等等.docx_第4页
c# WdInation Enumerationword 参数 页码等等.docx_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

WdInformation Enumeration1. office2003Namespace: Microsoft.Office.Interop.WordAssembly: Microsoft.Office.Interop.Word (in erop.word.dll)UsageVB复制用法Dim wdInformation1 As WdInformation = WdInformation.wdActiveEndAdjustedPageNumberSyntaxC#C+VB复制public enum WdInformationJ#复制public enum WdInformationJScript复制public enum WdInformationMembersMember nameDescriptionwdActiveEndAdjustedPageNumberReturns the number of the page that contains the active end of the specified selection or range. If you set a starting page number or make other manual adjustments, returns the adjusted page number (unlike wdActiveEndPageNumber).wdActiveEndPageNumberReturns the number of the page that contains the active end of the specified selection or range, counting from the beginning of the document. Any manual adjustments to page numbering are disregarded (unlike wdActiveEndAdjustedPageNumber).wdActiveEndSectionNumberReturns the number of the section that contains the active end of the specified selection or range.wdAtEndOfRowMarkerReturns True if the specified selection or range is at the end-of-row mark in a table.wdCapsLockReturns True if Caps Lock is in effect.wdEndOfRangeColumnNumberReturns the table column number that contains the end of the specified selection or range.wdEndOfRangeRowNumberReturns the table row number that contains the end of the specified selection or range.wdFirstCharacterColumnNumberReturns the character position of the first character in the specified selection or range. If the selection or range is collapsed, the character number immediately to the right of the range or selection is returned (this is the same as the character column number displayed in the status bar after Col).wdFirstCharacterLineNumberReturns the character position of the first character in the specified selection or range. If the selection or range is collapsed, the character number immediately to the right of the range or selection is returned (this is the same as the character line number displayed in the status bar after Ln).wdFrameIsSelectedReturns True if the selection or range is an entire frame or text box.wdHeaderFooterTypeReturns a value that indicates the type of header or footer that contains the specified selection or range, as shown in the following table.ValueType of header or footer- 1None (the selection or range isnt in a header or footer)0 (zero)Even page header1Odd page header (or the only header, if there arent odd and even headers)2Even page footer3Odd page footer (or the only footer, if there arent odd and even footers)4First page header5First page footerwdHorizontalPositionRelativeToPageReturns the horizontal position of the specified selection or range; this is the distance from the left edge of the selection or range to the left edge of the page measured in points (1 point = 20 twips, 72 points = 1 inch). If the selection or range isnt within the screen area, returns 1.wdHorizontalPositionRelativeToTextBoundaryReturns the horizontal position of the specified selection or range relative to the left edge of the nearest text boundary enclosing it, in points (1 point = 20 twips, 72 points = 1 inch). If the selection or range isnt within the screen area, returns - 1.wdInClipboardFor information about this constant, consult the language reference Help included with Microsoft Office Macintosh Edition.wdInCommentPaneReturns True if the specified selection or range is in a comment pane.wdInEndnoteReturns True if the specified selection or range is in an endnote area in print layout view or in the endnote pane in normal view.wdInFootnoteReturns True if the specified selection or range is in a footnote area in print layout view or in the footnote pane in normal view.wdInFootnoteEndnotePaneReturns True if the specified selection or range is in the footnote or endnote pane in normal view or in a footnote or endnote area in print layout view. For more information, see the descriptions of wdInFootnote and wdInEndnote in the preceding paragraphs.wdInHeaderFooterReturns True if the selection or range is in the header or footer pane or in a header or footer in print layout view. wdInMasterDocumentReturns True if the selection or range is in a master document (that is, a document that contains at least one subdocument).wdInWordMailReturns True if the selection or range is in the header or footer pane or in a header or footer in print layout view. ValueLocation0(zero)The selection or range isnt in an e-mail message.1The selection or range is in an e-mail message you are sending.2The selection or range is in an e-mail you are reading.wdMaximumNumberOfColumnsReturns the greatest number of table columns within any row in the selection or range.wdMaximumNumberOfRowsReturns the greatest number of table rows within the table in the specified selection or range.wdNumberOfPagesInDocumentReturns the number of pages in the document associated with the selection or range.wdNumLockReturns True if Num Lock is in effect.wdOverTypeReturns True if Overtype mode is in effect. The Overtype property can be used to change the state of the Overtype mode.wdReferenceOfTypeReturns a value that indicates where the selection is in relation to a footnote, endnote, or comment reference, as shown in the following table. ValueDescription 1The selection or range includes but isnt limited to a footnote, endnote, or comment reference.0 (zero)The selection or range isnt before a footnote, endnote, or comment reference.1The selection or range is before a footnote reference.2The selection or range is before an endnote reference.3The selection or range is before a comment reference.wdRevisionMarkingReturns True if change tracking is in effect.wdSelectionModeReturns a value that indicates the current selection mode, as shown in the following table. ValueSelection mode0 (zero)Normal selection1Extended selection (EXT appears on the status bar)2Column selection. (COL appears on the status bar)wdStartOfRangeColumnNumberReturns the table column number that contains the beginning of the selection or range.wdStartOfRangeRowNumberReturns the table row number that contains the beginning of the selection or range.wdVerticalPositionRelativeToPageReturns the vertical position of the selection or range; this is the distance from the top edge of the selection to the top edge of the page measured in points (1 point = 20 twips, 72 points = 1 inch). If the selection isnt visible in the document window, returns 1.wdVerticalPositionRelativeToTextBoundaryReturns the vertical position of the selection or range relative to the top edge of the nearest text boundary enclosing it, in points (1 point = 20 twips, 72 points = 1 inch). This is useful for determining the position of the insertion point within a frame or table cell. If the selection isnt visible, returns 1.wdWithInTableReturns True if the selection is in a table.wdZoomPercentageReturns the current percentage of magnification as set by the Percentage property.PlatformsDevelopment PlatformsWindows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 20002. office2010Specifies the type of information returned about a specified selection or range.Namespace: Microsoft.Office.Interop.WordAssembly: Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)SyntaxC#VB复制public enum WdInformationMembersMember nameDescriptionwdActiveEndAdjustedPageNumberReturns the number of the page that contains the active end of the specified selection or range. If you set a starting page number or make other manual adjustments, returns the adjusted page number (unlike wdActiveEndPageNumber).wdActiveEndSectionNumberReturns the number of the section that contains the active end of the specified selection or range.wdActiveEndPageNumberReturns the number of the page that contains the active end of the specified selection or range, counting from the beginning of the document. Any manual adjustments to page numbering are disregarded (unlike wdActiveEndAdjustedPageNumber).wdNumberOfPagesInDocumentReturns the number of pages in the document associated with the selection or range.wdHorizontalPositionRelativeToPageReturns the horizontal position of the specified selection or range; this is the distance from the left edge of the selection or range to the left edge of the page measured in points (1 point = 20 twips, 72 points = 1 inch). If the selection or range isnt within the screen area, returns 1.wdVerticalPositionRelativeToPageReturns the vertical position of the selection or range; this is the distance from the top edge of the selection to the top edge of the page measured in points (1 point = 20 twips, 72 points = 1 inch). If the selection isnt visible in the document window, returns 1.wdHorizontalPositionRelativeToTextBoundaryReturns the horizontal position of the specified selection or range relative to the left edge of the nearest text boundary enclosing it, in points (1 point = 20 twips, 72 points = 1 inch). If the selection or range isnt within the screen area, returns - 1.wdVerticalPositionRelativeToTextBoundaryReturns the vertical position of the selection or range relative to the top edge of the nearest text boundary enclosing it, in points (1 point = 20 twips, 72 points = 1 inch). This is useful for determining the position of the insertion point within a frame or table cell. If the selection isnt visible, returns 1.wdFirstCharacterColumnNumberReturns the character position of the first character in the specified selection or range. If the selection or range is collapsed, the character number immediately to the right of the range or selection is returned (this is the same as the character column number displayed in the status bar after Col).wdFirstCharacterLineNumberReturns the character position of the first character in the specified selection or range. If the selection or range is collapsed, the character number immediately to the right of the range or selection is returned (this is the same as the character line number displayed in the status bar after Ln).wdFrameIsSelectedReturns True if the selection or range is an entire frame or text box.wdWithInTableReturns True if the selection is in a table.wdStartOfRangeRowNumberReturns the table row number that contains the beginning of the selection or range.wdEndOfRangeRowNumberReturns the table row number that contains the end of the specified selection or range.wdMaximumNumberOfRowsReturns the greatest number of table rows within the table in the specified selection or range.wdStartOfRangeColumnNumberReturns the table column number that contains the beginning of the selection or range.wdEndOfRangeColumnNumberReturns the table column number that contains the end of the specified selection or range.wdMaximumNumberOfColumnsReturns the greatest number of table columns within any row in the selection or range.wdZoomPercentageReturns the current percentage of magnification as set by the Percentage property.wdSelectionModeReturns a value that indicates the current selection mode, as shown in the following table. ValueSelection mode0 (zero)Normal selection1Extended selection (EXT appears on the status bar)2Column selection. (COL appears on the status bar)wdCapsLockReturns True if Caps Lock is in effect.wdNumLockReturns True if Num Lock is in effect.wdOverTypeReturns True if Overtype mode is in effect. The Overtype property can be used to change the state of the Overtype mode.wdRevisionMarkingReturns True if change tracking is in effect.wdInFootnoteEndnotePaneReturns True if the specified selection or range is in the footnote or endnote pane in normal view or in a footnote or endnote area in print layout view. For more information, see the descriptions of wdInFootnote and wdInEndnote in the preceding paragraphs.wdInCommentPaneReturns True if the specified selection or range is in a comment pane.wdInHeaderFooterReturns True if the selection or range is in the header or footer pane or in a header or footer in print layout view. wdAtEndOfRowMarkerReturns True if the specified selection or range is at the end-of-row mark in a table.wdReferenceOfTypeReturns a value that indicates where the selection is in relation to a footnote, endnote, or comment reference, as shown in the following table. ValueDescription1The selection or range includes but isnt limited to a footnote, endnote, or comment reference.0 (zero)The selection or range isnt before a footnote, endnote, or comment reference.1The selection or range is before a footnote reference.2The selection or range is before an endnote reference.3The selection or range is before a comment reference.wdHeaderFooterTypeReturns a value that indicates the type of header or footer that contains the specified selection or range, as shown in the following table.ValueType of header or footer1None (the selection or range isnt in a header or footer)0 (zero)Even page header1Odd page header (or the only header, if there arent odd and even headers)2Even page footer3Odd page footer (or the only footer, if there arent odd and even footers)4First page header5First page footerwdInMasterDocumentReturns True if the selection or range is in a master document (that is, a document that contains at least one subdocument).wdInFootnoteReturns True if the specified selection or range is in a footnote area in print layout view or in the footnote pane in normal view.wdInEndnoteReturns True if the specified selection or range is in an endnote area in print layout view or in the endnote pane in normal view.wdInWordMailReturns True if the selection or range is in the header or footer pane or in a header or footer in print layout view. ValueLocation0(zero)The selection or range isnt in an e-mail message.1The selection or range is in an e-mail message you are sending.2The selection or range is in an e-mail you are reading.wdInClipboardFor information about this constant, consult the language reference Help included with Microsoft Office Macintosh Edition.3. 应用:1MsgBox 当前页码为 & _Selection.Information(wdActiveEndPageNumber) & Chr(13) & 总页码为 _& Selection.Information(wdNumberOfPagesInDocument)End Sub2/总页码kk = ActiveDocument.BuiltInDocumentProperties(wdPropertyPages)3/当前选择的行KK1 = Selection.Information(wdFirstCharacterLineNumber) - -当前行-Information 属性 返回有关指定的所选内容或区域的信息。Variant 类型,只读。 语法 expression.Information(Type) expression 必需。该表达式返回一个 Range 或 Selection 对象。 Type Long 类型,必需。需要返回的信息。可取下列 WdInformation 常量之一: wdActiveEndAdjustedPageNumber 返回页码,在该页中包含指定的所选内容或区域的活动结尾。如果设置了一个起始页码,并对页码进行了手工调整,则返回调整过的页码(与 wdActiveEndPageNumber 不同)。 wdActiveEndPageNumber 返回页码,在该页中包含指定的所选内容或区域的活动结尾,页码从文档的开头开始计算而不考虑对页码的任何手工调整(与 wdActiveEndAdjustedPageNumber 不同)。 wdActiveEndSectionNumber 返回节号,在该节中包含了指定的所选内容或区域的活动结尾。 wdAtEndOfRowMarker 如果指定的所选内容或区域位于表格的行结尾标记处,则本参数返回 True。 wdCapsLock 如果大写字母锁定模式有效,则本参数返回 True。 wdEndOfRangeColumnNumber 返回表格列号,在该表格列中包含了指定的所选内容或区域的活动结尾。 wdEndOfRangeRowNumber 返回表格行号,在该表格行包含了指定的所选内容或区域的活动结尾。 wdFirstCharacterColumnNumber 返回指定的所选内容或区域中第一个字符的位置。如果所选内容或区域是折叠的,则返回所选内容或区域右侧紧接着的字符编号(这个编号与状态栏中“列”后面的字符列数相同)。 wdFirstCharacterLineNumber 返回所选内容中第一个字符的行号。如果 Pagination 属性为 False,或 Draft 属性为 True,则返回 - 1。 wdFrameIsSelected 如果所选内容或区域是一个完整的图文框文本框,则本参数返回 True。 wdHeaderFooterType 返回一个值,该值表明包含了指定的所选内容或区域的页眉或页脚的类型,如下表所示。值 页眉或页脚的类型 - 1 无(所选内容或区域不在页眉或页脚中) 0 偶数页页眉 1 奇数页页眉(如果没有偶数或奇数页眉,则只是页眉) 2 偶数页页脚 3 奇数页页脚(如果没有偶数或奇数页脚,则只是页脚) 4 第一个页眉 5 第一个页脚 wdHorizontalPositionRelativeToPage 返回指定的所选内容或区域的水平位置。该位置是所选内容或区域的左边与页面的左边之间的距离,以磅为单位(20 缇 = 1 磅, 72 磅 = 1 英寸)。如果所选内容或区域不可见,则返回 - 1。 wdHorizontalPositionRela

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论