SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Merge word doc

 
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite View previous topic
View next topic
Merge word doc
Author Message
Pierre Dupuis



Joined: 22 Aug 2000
Posts: 85

Post Merge word doc Reply with quote

Hi,

Can I use FileRead and FileWrite to merge 5 word
document (or RTF) into one document?

Thanks for your help.

Pierre

Mon Jul 19, 2004 9:54 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7969

Post Re: Merge word doc Reply with quote

I don't think so. Word files are binary files and they cannot be appended to each other as text files can.

What you can do is to use a VBScript job in 24x7 to call Word COM object and programmatically open and append files using Word native methods.
Example script:

Sub Main()

Dim ObjWord
Set ObjWord = GetObject(, "Word.Application")
ObjWord.Documents.Add
ObjWord.Selection.InsertFile "document 1.doc", "", False, False, False
ObjWord.Selection.InsertFile "document 2.doc", "", False, False, False
... etc...

ObjWord.Quit
Set ObjWord = Nothing

End Sub

See description of available Word functions in your Word documentation or MSDN

See also other Word example at
http://support.microsoft.com/default.aspx?kbid=258512

: Hi,

: Can I use FileRead and FileWrite to merge 5 word
: document (or RTF) into one document?

: Thanks for your help.

: Pierre

Mon Jul 19, 2004 10:15 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » 24x7 Scheduler, Event Server, Automation Suite All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.