|
-
Jun 15th, 2002, 12:06 AM
#1
Thread Starter
Addicted Member
Printing from a Res file
To extract a file from a res file u use the code
Code:
sBuffer = StrConv(LoadResData("Easy", "CERTIFICATES"), vbUnicode)
Open App.Path & "\Easy.DOC" For Output As #1
Print #1, sBuffer
then
Code:
'Kill App.Path & "\Easy.DOC"
to close the file
but all that does it loads the file but doesnt print it
how do i print it
thanks Trav
-
Jun 15th, 2002, 06:24 AM
#2
Frenzied Member
What do you mean by "Print"? What you're doing there is outputing/writing the text to the file App.Path & "\Easy.DOC". I may be misunderstanding you here, but why are you using Kill, should you use Close #1 to close the file? Kill just deletes the file you have just created.
-
Jun 15th, 2002, 08:07 PM
#3
Thread Starter
Addicted Member
yeaa i know that the kil command deltes the file and the close command stops it
but how do i actually print
that code only opens the file but doesnt print it
do u know how to make it print
-
Jun 15th, 2002, 08:15 PM
#4
-
Jun 15th, 2002, 09:25 PM
#5
Thread Starter
Addicted Member
print to the printer
do u know how to do it
-
Jun 15th, 2002, 09:31 PM
#6
Frenzied Member
VB Code:
Dim ws As New Word.Application
Dim wa As Word.Document
Buffer = StrConv(LoadResData("Easy", "CERTIFICATES"), vbUnicode)
Open App.Path & "\Easy.DOC" For Output As #1
Print #1, sBuffer
ws.Visible = False
Set wa = ws.Documents.Open(App.Path & "\Easy.DOC")
wa.Activate
ws.PrintOuts
Close #1
Kill App.Path & "\Easy.DOC"
MicroBasic
Dragon Shadow Trainer
There is no good or evil in the world...only programmers and fools .
-
Jun 15th, 2002, 09:33 PM
#7
-
Jun 15th, 2002, 09:42 PM
#8
Thread Starter
Addicted Member
i cant find the tlb file in object libary for ms word
can u zip it pls and send it to me
-
Jun 15th, 2002, 09:43 PM
#9
Thread Starter
Addicted Member
dont worry found it
i have 10.0
-
Jun 15th, 2002, 09:44 PM
#10
Thread Starter
Addicted Member
it doesnt like the code
printout
-
Jun 15th, 2002, 09:46 PM
#11
-
Jun 15th, 2002, 09:47 PM
#12
-
Jun 15th, 2002, 09:49 PM
#13
Thread Starter
Addicted Member
thanks heaps for your help
Trav
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
|