Tried with both wdCollapseEnd and wdCollapseStart ' RED and Blue Respectively
Code:
With objRange
.Collapse Direction:=wdCollapseEnd 'collapse the range
.Text = txtword 'write to the range
.Font.Name = "Tahoma" 'format the range
.Font.Size = "12"
.ParagraphFormat.SpaceAfter = 0
.Collapse Direction:=wdCollapseEnd 'collapse the range
End With
As coded by you With above, the range started immediately after CommandButton but completely New As Document1
but when i changed as below, the range was seen in completely New As Document1
Code:
With objRange
.Collapse Direction:=wdCollapseStart 'starts the Range in NewPage
.Text = txtword 'write to the range
.Font.Name = "Tahoma" 'format the range
.Font.Size = "12"
.ParagraphFormat.SpaceAfter = 0
.Collapse Direction:=wdCollapseEnd 'collapse the range
End With
Any Possibility to add page 2 and to start the Range in Page 2 of the current document "C:\WordTrial\cmdBtnWord.docm"
Also with above coding trials. Observed one thing whenever Document1 or new document Opens with that one more document opens but without a Page and item in Ribbons are disabled. Could you explain why this happens ?