page break in word document using vba

DevAccess

Registered User.
Local time
Today, 04:50
Joined
Jun 27, 2016
Messages
321
Hello there,
I need to append paragraph to the existing paragraph using vba, but before I insert to the existing paragraph I need to insert paragraph. Can anybody please help me with this. ?

I am fetching records from access and preparing word report, earlier I was creating different word report for each row from access now I would like to append similar records in one word document using vba and would like to insert page break before I insert new paragaraph.

Thanks
DJ
 
wdapp.Visible = True
Set wddoc = wdapp.Documents.Add
Else
MsgBox "1"
SendKeys "{Ctl-enter}"
MsgBox "2"
End If
 
SendKeys is a primitive approach that is easily avoided.

Code:
Selection.InsertBreak wdPageBreak
 

Users who are viewing this thread

Back
Top Bottom