我试一下
但是我程序运行了
WordDocumentExport.ConnectTo(IUnknown(pOneTabInfleWord.OleObject) as _Document);
for nIndex:=1 to WordDocumentExport.Application.CommandBars.Count-1 do
begin
WordDocumentExport.Application.CommandBars[nIndex].Top := ToolBarTop.Top -ToolBarTop.Height ;
WordDocumentExport.Application.CommandBars[nIndex].Left := ToolBarTop.Left;
//或 WordDocumentExport.Application.CommandBars[nIndex].Position := $00000001;
end;
WordDocumentExport.Disconnect;