You are on page 1of 1

sub save_workspace_files()

documents.open ("c:\word_workspace_file.doc")
selection.wholestory
selection.delete unit:=wdcharacter, count:=1
for i = 2 to documents.count
selection.typetext text:=documents.item(i).fullname
selection.typeparagraph
next
activedocument.close (wdsavechanges)
msgbox "opened file's fullnames was saved: c:\word_workspace_file.doc"
end sub
sub load_workspace_files()
dim a as string
dim i as integer
i = 0
documents.open ("c:\word_workspace_file.doc")
activedocument.pagesetup.orientation = wdorientlandscape
while activedocument.paragraphs.count > 1
selection.homekey unit:=wdstory
selection.endkey unit:=wdline, extend:=wdextend
selection.moveleft unit:=wdcharacter, count:=1, extend:=wdextend
a = selection.text
selection.cut
selection.delete unit:=wdcharacter, count:=1
documents.open (a)
i = i + 1
documents.item("c:\word_workspace_file.doc").activate
wend
activedocument.close (wddonotsavechanges)
msgbox "all document (" + str(i) + " ) opened succesfully"
end sub

You might also like