View Single Post
 
Old 08-13-2012, 10:50 PM
ubns ubns is offline Windows 7 32bit Office 2010 32bit
Competent Performer
 
Join Date: Apr 2012
Posts: 177
ubns is on a distinguished road
Default

Hi Paul,

I have done the following -- based on your sugg

Code:
Sub Document_Open()
With ActiveDocument
  If InStr(.Sections.First.Footers(wdHeaderFooterFirstPage).Range.Text, "Statement of Advice") > 0 Then
    Application.OrganizerCopy Source:=.AttachedTemplate.FullName, Destination:=.FullName, _
      Name:="custom breakout".NameLocal, Object:=wdOrganizerObjectStyles
  End If
End With
End Sub
it is giving syntax error.

also if there is more than one style of heading - then how would we enter the multiple style names.

Does this needs to be in "This Document" of Normal.dotm.

Regards

Umesh Banga

Last edited by macropod; 08-14-2012 at 04:19 AM. Reason: Added code tags & formatting
Reply With Quote