D dfs Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-05 #1 请各位高手帮忙! 在使用SERVER页中的WORD控件时如何通过DELPHI来打开打印预览。 谢谢!
B bbs_delphi Unregistered / Unconfirmed GUEST, unregistred user! 2001-12-06 #2 application.printpreview
G gaojun89757 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-22 #4 好象是用WordDocument.Printpreview;
A ably Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-26 #5 我用OLE,application.printpreview worddocument.printpreview都不能预览
G gaojun89757 Unregistered / Unconfirmed GUEST, unregistred user! 2002-01-26 #6 请试一下: var MSWord: Variant; ItemIndex: OleVariant; begin ItemIndex := 1; Wordapplication1.Connect; Wordapplication1.Visible := true; MSWord := CreateOLEObject('Word.Application'); MSWord.Documents.Open(FileName:='E:/test.doc', ReadOnly:=True); WordDocument1.ConnectTo(WordApplication1.Documents.Item(ItemIndex)); WordDocument1.printpreview; end;
请试一下: var MSWord: Variant; ItemIndex: OleVariant; begin ItemIndex := 1; Wordapplication1.Connect; Wordapplication1.Visible := true; MSWord := CreateOLEObject('Word.Application'); MSWord.Documents.Open(FileName:='E:/test.doc', ReadOnly:=True); WordDocument1.ConnectTo(WordApplication1.Documents.Item(ItemIndex)); WordDocument1.printpreview; end;