WordDocument->GoTo(...)的参数怎么填?
WordDocument-> GoTo(tagVARIANT * what,
tagVARIANT * whitch,
tagVARIANT * count,
tagVARIANT * name)
四个参数都是 tagVARIANT * 类型,不知如何赋值,
如what 填 wdGoToLine 报类型不能转换的错误。
先谢谢各位高手指点
[解决办法]
var
What,Which,Count,CName,MarkName:OleVariant;
begin
What:=wdGoToBookmark;
Which:=wdGotoNext;
Count:=1;
CName:=strMarkName;
//MarkName:=strMarkName;
m_WordDocument.Application.Selection.GoTo_(What,Which,Count,CName);
[解决办法]
8.WORD 中光标的定位:
app_Word.Selection.GoTo_(Var What,Which,Count,Name: OleVariant);
What 取值: (wdGoToBookmark,wdGoToSection,wdGoToPage,wdGoToTable,wdGoToLine,wdGoToFootnote,wdGoToEndnote,wdGoToComment,wdGoToField,wdGoToGraphic,wdGoToObject,wdGoToEquation,wdGoToHeading,wdGoToPercent,wdGoToSpellingError,wdGoToGrammaticalError,wdGoToProofreadingError)
Which 取值: (wdGoToFirst,wdGoToLast,,wdGoToNext,wdGoToRelative,wdGoToPrevious,wdGoToAbsolute)
Count 取值:(1,2,3….)
Name 取值:string;一般可以为’’;