murfeezlaw
Programmer
I'm using VBA to add a new document into the current open document. The title at the top of the new document that was inserted is being formatted in columns. How can i stop this? My code is below...
For Each ctrl In Me![sfmStateForms].Form.Controls
If TypeOf ctrl Is CheckBox And ctrl.Tag = "Mandatory" Then
If ctrl.Value = True Then
objWord.Selection.InsertFile "L:\Forms\" & Right(ctrl.Name, Len(ctrl.Name) - 3) & ".doc"
objWord.Selection.EndKey Unit:=wdStory
objWord.Selection.InsertBreak Type:=wdSectionBreakOddPage
End If
End If
Next
I tried different section breaks but it is keeping the formatting from the previous page. Any ideas?
TIA
Ted
For Each ctrl In Me![sfmStateForms].Form.Controls
If TypeOf ctrl Is CheckBox And ctrl.Tag = "Mandatory" Then
If ctrl.Value = True Then
objWord.Selection.InsertFile "L:\Forms\" & Right(ctrl.Name, Len(ctrl.Name) - 3) & ".doc"
objWord.Selection.EndKey Unit:=wdStory
objWord.Selection.InsertBreak Type:=wdSectionBreakOddPage
End If
End If
Next
I tried different section breaks but it is keeping the formatting from the previous page. Any ideas?
TIA
Ted