Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 26th, 2003, 06:17 PM
crackerweb crackerweb is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Posts: 786 crackerweb User rank is Private First Class (20 - 50 Reputation Level)crackerweb User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 18 h 16 m
Reputation Power: 6
transferring filtered records to MS Word

any suggestion how can i transfer filtered records to MS Word. Whenever I use the AppWord.Documents.Add it only adds the last record

Reply With Quote
  #2  
Old November 27th, 2003, 09:34 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Which type record do u use?If u use ms access,u can use ado object to read the recordset and use office word object to write these recordsets to the word document with youre custom format...

Reply With Quote
  #3  
Old November 27th, 2003, 03:54 PM
crackerweb crackerweb is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Posts: 786 crackerweb User rank is Private First Class (20 - 50 Reputation Level)crackerweb User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 18 h 16 m
Reputation Power: 6
I'm using MS Access, I tried to run a test on how the program works, the problem in this test is this

......
AppWord.Documents.Add
AppWord.ActiveDocuments.Content.Text="Hello"
AppWord.ActiveDocuments.Content.Text="This is a test"

.....

the problem is instead of printing both 'hello' and 'this is a test' it only prints the latter

anyway so that i can print those two

Reply With Quote
  #4  
Old November 27th, 2003, 06:35 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Chang your code like it:
AppWord.ActiveDocuments.Content.Text="Hello"
AppWord.ActiveDocuments.Content.Text=AppWord.ActiveDocuments.Content.Text & vbcrlf & "This is a test"

Reply With Quote
  #5  
Old November 28th, 2003, 04:29 PM
crackerweb crackerweb is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Posts: 786 crackerweb User rank is Private First Class (20 - 50 Reputation Level)crackerweb User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Day 18 h 16 m
Reputation Power: 6
thanks cleverpig!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > transferring filtered records to MS Word


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway