David_Ng
Member
Members
Forum Posts: 312
Member Since:
December 5, 2016
December 5, 2016
Offline
I want to split a document preserving the format try using the following VB scripts but failed to keep the format after file split into 110 files .
Can someone help to rectify the errors
Sub Split()
Dim i As Long, Source As Document, Target As Document, Letter As Range
Set Source = ActiveDocument
For i = 1 To Source.Sections.Count
Set Letter = Source.Sections(i).Range
Set Target = Documents.Add
Target.Range = Letter
Target.Sections(1).PageSetup.SectionStart = wdSectionContinuous
Source.Range.FormattedText = Target.Range.FormattedText
Target.SaveAs FileName:="C:\DATA\" & "Letter to Creditor inviting views - " & i
Target.Close
Next i
End Sub
Hans Hallebeek
the Netherlands
Member
Members
Trusted Members
Trusted Members
Forum Posts: 354
Member Since:
October 17, 2018
October 17, 2018
Offline
Hans Hallebeek
the Netherlands
Member
Members
Trusted Members
Trusted Members
Forum Posts: 354
Member Since:
October 17, 2018
October 17, 2018
Offline
Anders Sehlstedt
Eskilstuna, Sweden
VIP
Members
Trusted Members
Trusted Members
Forum Posts: 930
Member Since:
December 7, 2016
December 7, 2016
Offline
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online:
Guest(s) 8
Currently Browsing this Page:
1 Guest(s)
1 Guest(s)
Top Posters:
Catalin Bombea: 1939
SunnyKow: 1432
Anders Sehlstedt: 930
Purfleet: 415
Hans Hallebeek: 354
Frans Visser: 349
David_Ng: 312
lea cohen: 248
Jessica Stewart: 219
A.Maurizio: 216
Newest Members:
QkBXoylJZ ionivxwYdRFNFL
kEUeirrVvEo LuuDySmTmIizW
uavBfwotTrMPA NIQkZzprwMG
qVMPnaSzpgZ uaHBwyav
rCkwbAORdf eaYibAkYjfXT
eNvhcbgYvaPRp nImfgnjOk
kwKbBpnpPjgKuhr LSOUORDzhcRqQ
CPUXMYKMkLuXs iAsOmBtNLn
Clive Webb
EXerOrqW PRqmMlMeyNd
Forum Stats:
Groups: 3
Forums: 25
Topics: 7095
Posts: 31105
Member Stats:
Guest Posters: 49
Members: 34536
Moderators: 2
Admins: 3
Administrators: Mynda Treacy, Philip Treacy, Jessica
Moderators: Velouria, Riny van Eekelen
© Simple:Press —