开发者

document template in vb6?

I'm making a vb6 project which deals with printing. I'm going to print some receipt and promissory note. Can I make a MS-Word (.doc) document file template, so that when I'm going to print the receipt and PN, I'll just have to open the .doc f开发者_StackOverflow社区ile and fill up the blank spaces on it.

Sorry for asking such question.

Thanks for the replies.


You should be able to get this done by using the Word Object library in VB6. You will need to add a reference to it in your project. It's called 'Automation' because you will be causing an instance of Word to open via your VB6 code.

See this article for more details: http://support.microsoft.com/kb/313193


Use a report printing library/component and create your documents as report templates. Any good reporting library will let you fill in the details of the document at run time and will support various printing options which would be difficult and time consuming to write on your own. Word interop as @Craigj noted would also work but requires Word to be installed on any PC that is running the software.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜