im using vs 2005 language vb
i'm trying to select * from a table. then display those information in word with a certain font and template in word. How do i do that? could anyone help me? thank you very much
Printable View
im using vs 2005 language vb
i'm trying to select * from a table. then display those information in word with a certain font and template in word. How do i do that? could anyone help me? thank you very much
I would use the clipboard to paste the data in Word.
When working in Word or Excel, I usually create a macro, perform all the steps I want to happen, then make use of the macro generated VB code.
You might want to start with the Word and .NET sections in my FAQ - http://vbforums.com/showthread.php?t=358585
maybe you guys misunderstood my question or i didnt understand your answer. but
my question is like this:
i have a table in the sql server. so now i want to select all rows in that table. and then output it into word using vb 2005
table
column 1 column 2 column 3
1 Hey Now
2 YO What
output in word
1 Hey Now 2 Yo What
Hey Now Yo What
please help
Yes, I completely understood. What type of word document do you need? A MailMerge? If so then setup your mailmerge to connect to the sql table and place the fields in your document. Run the MM or automatically invoke it by opening the document with a proces.start.
MailMerge documents is a FAQ item in my Office Dev FAQ. ;)
one of those easy peel labels so you could print your address on it like this
etc....Code:hello smith hello smith
123 wood ave 123 wood ave
worcester, ma 01606 worcester, ma 01606
i just want to see it likes that on ms word. i dont need to mail merge or do anything else. thank you
mail merge seems to be correct. but what i want to do is write code in vb 2005 and shoot out the information from database then opens up in ms word and have format as label type.
Um, using a pre-created formatted document made by you or create it all on the fly?