|
-
Jun 19th, 2000, 01:01 AM
#1
Thread Starter
New Member
Is there any way to append MS Word files together through VB? I've tried:
Open "c:\word.doc" For Append As #1
Open "c:\part1.doc" For Input As #2
Open "c:\part2.doc" For Output As #3
Do Until EOF(2)
Line Input 2, Z$
Print #1, Z$
Loop
Do Until EOF(3)
Line Input 3, Z$
Print #1, Z$
Loop
But all that is produced is garbage. Any ideas?
-
Jun 19th, 2000, 01:04 AM
#2
you cant just do it like that, because of all the formatting characters and crap like that.
use a macro in VBA to do what your trying to achieve.
-
Jun 19th, 2000, 01:23 AM
#3
PowerPoster
join them binary:
Code:
Dim Temp() as Byte
Dim FileNumber as Integer
FileNumber = FreeFile
Open SourceFile for Binary as FileNumber
ReDim Temp(LOF(FileNuber))
Get FileNumber,, Temp
Close FileNumber
FileNumber = FreeFile
Open DestFile for Binary as FileNumber
Putt FileNumber, LOF(FileNumber), Temp
Close FileNumber
Something like this...
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
|