-
June 19th, 2012, 01:15 AM
#1
Word App: To generate the word doc
Hye guys,
Needing you help.
I want to print out the word document for the information in my database. Basically, I have 1 tables in 1 database.
First table:
DEFINE_VERIFY_ROOT_CAUSE_FINDINGS (field's name)
(1)hye(2)zack(3)nick(4)and(5)aaron - in one row
I have no problem to print out the 'word app' for the words/sentence for the first table using :
.Selection.TypeText Text:=NullReturnTEXT(rst("DEFINE_VERIFY_ROOT_CAUSE_FINDINGS"))
But, im do not know how to print out the sentence separately. eg:
(1)hye
(2)zack
(3)nick
(4)and
(5)aaron
Hope u guys could help.
-
June 25th, 2012, 12:34 PM
#2
Re: Word App: To generate the word doc
In the event that the string "Hey Zack Nick and Sharon" is in one field (you didn't specify), you could bring the string into a string variable and then use the Replace function to replace the space with vbcrlf:
Code:
REPLACE(strInStringFromDB," ",vbcrlf)
If they are in separate fields, you could bring them into the same string and then insert the line feed:
Code:
strInStringFromDB = rs!Hey & vbcrlf & rs!Zack & vbcrlf & rs!Nick & vbcrlf & rs!and & vbcrlf & rs!Aason
If it's something more complicated than that, we need more detailed information from you in order to help.
-
July 31st, 2012, 01:33 AM
#3
Re: Word App: To generate the word doc
Or you may check this data export(A free edition available): http://www.e-iceblue.com/Introduce/d...net-intro.html It can help you export data from datatable to Word/Excel/PDF in your .NET application.
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
|