|
-
Nov 12th, 2007, 04:56 PM
#1
Thread Starter
Hyperactive Member
select table then display in word
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
-
Nov 12th, 2007, 08:14 PM
#2
Addicted Member
Re: select table then display in word
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.
-
Nov 12th, 2007, 08:36 PM
#3
Re: select table then display in word
You might want to start with the Word and .NET sections in my FAQ - http://vbforums.com/showthread.php?t=358585
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 12th, 2007, 08:53 PM
#4
Thread Starter
Hyperactive Member
Re: select table then display in word
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
-
Nov 12th, 2007, 08:56 PM
#5
Re: select table then display in word
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.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Nov 13th, 2007, 08:40 AM
#6
Thread Starter
Hyperactive Member
Re: select table then display in word
one of those easy peel labels so you could print your address on it like this
Code:
hello smith hello smith
123 wood ave 123 wood ave
worcester, ma 01606 worcester, ma 01606
etc....
i just want to see it likes that on ms word. i dont need to mail merge or do anything else. thank you
Last edited by dummies2; Nov 13th, 2007 at 08:44 AM.
-
Nov 14th, 2007, 02:27 PM
#7
Thread Starter
Hyperactive Member
Re: select table then display in word
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.
-
Nov 23rd, 2007, 02:13 PM
#8
Re: select table then display in word
Um, using a pre-created formatted document made by you or create it all on the fly?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|