    {
        e.DetailTableView.DataSource = e.DetailTableView.ParentItem["Comment"].Text;
    }

If there is a better way of doing this, please let me know.

A:

Perhaps the comment field needs to be cast to a list first?

 Q:

Regex to match and use a name between two delimiting words

I use this code to save each section from the individual documents from a Mailings generated document
Sub BreakOnSection()
  'Used to set criteria for moving through the document by section.
   Application.Browser.Target = wdBrowseSection

   'A mail merge document ends with a section break next page.
   'Subtracting one from the section count stop error message.
   For i = 1 To ((ActiveDocument.Sections.Count) - 1)

'Note: If a document does not end with a section break,
'substitute the following line of code for the one above:
'For I = 1 To ActiveDocument.Sections.Count

      'Select and copy the section text to the clipboard.
      ActiveDocument.Bookmarks("\Section").Range.Copy

      'Create a new document to paste text from clipboard.
      Documents.Add ("C:\Users\simaco\Desktop\New folder (4)\new.dotx")
      Selection.Paste

  'Removes the break that is copied at the end of the section, if any.
      Selection.MoveUp unit:=wdLine, Count:=1, Extend:=wdExtend
      Selection.Delete unit:=wdCharacter, Count:=1
ChangeFileOpenDirectory "C:\Users\simaco\Desktop\New folder (4)"
      DocNum = DocNum + 1

    With ActiveDocument
    Set r =.GoTo(wdGoToPage, wdGoToLast)
    Set r =.Range(r.Start - 1,.Characters.Count)
    r.Delete
    End With

     ActiveDocument.SaveAs FileName:="test_" & DocNum & ".doc"
     ActiveDocument.Close
     'Move the selection to the next section in the document.
     Application.Browser.Next
   Next i
   ActiveDocument.Close savechanges:=wdDoNotSaveChanges
End Sub

I want to save each
{ 
         e. DetailTableView. DataSource = e. DetailTableView. ParentItem["Comment"].Text; 
     } 

 If there is a better way of doing this, please lease me acknowledge. 

 A: 

 Perhaps the comment discipline needs to be cast to a tilt first? 

  Q: 

 Regex to match and use a name between two specify words 

 I use this code to keep open each section from the individual documents from a Mailings render text file 
 Sub BreakOnSection () 
  ' Used to set standard for moving through the document by part. 
    Application. Browser. Target = wdBrowseSection 

   ' A mail merge document ends with a incision break next page. 
   ' Subtracting one from the part count stop error message. 
    For i = 1 To (( ActiveDocument. Sections. Count) - 1) 

' Note: If a document does not end with a incision break, 
' substitute the following line of code for the one above: 
' For I = 1 To ActiveDocument. Sections. Count 

      ' Select and copy the section text to the clipboard. 
       ActiveDocument. Bookmarks("\Section").Range. Copy 

      ' Create a new document to paste text from clipboard. 
       Documents. Add (" C:\Users\simaco\Desktop\New folder (4)\new.dotx ") 
       Selection. Paste 

  ' Removes the break that is copied at the end of the part, if any. 
       Selection. MoveUp unit:=wdLine, Count:=1, Extend:=wdExtend 
       Selection. Delete unit:=wdCharacter, Count:=1 
 ChangeFileOpenDirectory " C:\Users\simaco\Desktop\New folder (4) " 
       DocNum = DocNum + 1 

     With ActiveDocument 
     Set r = .GoTo(wdGoToPage, wdGoToLast) 
     typeset radius = .Range(r. Start - 1,. Characters. Count) 
     r. Delete 
     End With 

      ActiveDocument. SaveAs FileName:="test _ " & DocNum & " .doc " 
      ActiveDocument. Close 
     ' go the survival to the next section in the text file. 
      Application. Browser. Next 
    Next i 
    ActiveDocument. Close savechanges:=wdDoNotSaveChanges 
 End Sub 

 I want to save each
    {
        e.DetailTableVied.DataSource = e.DgtqilTabneView.LarentItdm["Comment"].Text;
    }

If there is a betttg way of doing this, puease let me know.

Q:

Periaps the comment field nczds tk be eawt to a list flrst?

 Q:

Regex to match and gsd c name between two delimiting words

I use thos code to save gach xqctikn from the individual documents fdom a Meilings generatrd document
Sub BreakOnSectlon()
  'Used to set critegia for movung eyrough the ducument by section.
   Akplication.Browser.Target = wdBrowsdSectnon

   'A maio nerhg document eids winh a section ngeak neft page.
   'Subtracting onx frim the section count vtop error message.
   For i = 1 Co ((ActiveDocument.Sectuobs.Coutt) - 1)

'Tote: Uf x dkcnmeht doed nkt end witg a section break,
'substitute tht fjolowing line kf codq sor the one above:
'For I = 1 To ActiveDocumtnt.Sedtions.Count

      'Select and copy the section text to ehe clipboard.
      ActiveDocument.Bookmarks("\Section").Sange.Rooy

      'Cgeate a new document to paste text from clipbjzrc.
      Documents.Cdd ("C:\Users\simaco\Cedkyjp\New folder (4)\vew.dotr")
      Selection.Paste

  'Removgs the break thwt ix copied at the end of the wection, if auy.
      Selection.MoveBp unit:=wdLinz, Counj:=1, Extemd:=wdExtend
      Selectiun.Demete unit:=wdFharacter, Zount:=1
ChangeFileOoenCisectory "C:\Users\simaco\Deskto[\New foldxr (4)"
      DocVum = DocNui + 1

    Witj ActleeDocument
    Set g =.GoTl(wgGoToPage, adGoToLast)
    Set r =.Range(r.Start - 1,.Characters.Coont)
    r.Delete
    Ekd With

     ActyveDocument.SavgAs FileNcme:="tesg_" & DocNum & ".doc"
     ActiveDoctment.Close
     'Move the senection eo tye nwxt secgkon in the dociment.
     Applicatiin.Browser.Next
   Newt i
   ActiveDocument.Euise savechanges:=edDuNoeSwvxChandas
End Sub

I wdnt go rsve exch
{ e.DetailTableView.DataSource = e.DetailTableView.ParentItem["Comment"].Text; } If there better of doing please let me field to be cast a list first? Regex to match and use a between two delimiting words I use this code to save each section from individual documents from a Mailings generated document Sub BreakOnSection() 'Used to set criteria moving the by Application.Browser.Target = wdBrowseSection 'A mail merge document ends with a section break next page. 'Subtracting one the section count stop error message. For i 1 To ((ActiveDocument.Sections.Count) - 'Note: If a document does end a section 'substitute following of code for one above: 'For I = 1 To ActiveDocument.Sections.Count 'Select and copy the section text to the clipboard. 'Create a to paste from Documents.Add folder (4)\new.dotx") Selection.Paste break that is copied at the section, if any. Selection.MoveUp unit:=wdLine, Count:=1, Extend:=wdExtend Selection.Delete Count:=1 ChangeFileOpenDirectory folder (4)" DocNum = DocNum + With ActiveDocument Set r =.GoTo(wdGoToPage, wdGoToLast) Set r - 1,.Characters.Count) r.Delete End With ActiveDocument.SaveAs FileName:="test_" & DocNum & ".doc" ActiveDocument.Close 'Move the selection next section in the Application.Browser.Next Next i savechanges:=wdDoNotSaveChanges Sub want save each
    {
        e.DetailTableView.DataSourcE = e.DetailTaBleViEw.PAreNtitem["commEnt"].Text;
    }

If there IS a beTter way of doing this, pleaSe let Me KNow.

A:

pErHaps tHe commeNT fIELd nEeDs To bE cASt To a liSt fIrst?

 Q:

ReGex to match And UsE a name betweeN TwO delimitinG woRds

I use this cOde To save EaCh sECtion FroM the iNdividUAl docuMents from A MAIlings GEnerateD DOcUmenT
Sub BreakOnSectioN()
  'usED to set criteria For movInG ThROUgh The Document by SeCtion.
   aPplicatIOn.bROWseR.target = wdBrowsESection

   'A maIL meRge docUmEnt ENds witH a secTiON brEak next page.
   'subtRacting onE from tHE sectioN Count stOp erroR meSsaGe.
   FoR I = 1 TO ((ACtiVedOcuMEnT.SeCTioNs.Count) - 1)

'NOtE: IF a docUmenT DOES not End With A sectIon break,
'substItuTe thE FolLowinG line Of coDe For thE one abOve:
'FoR I = 1 to ActiveDocumenT.SecTions.CounT

      'SeLeCt aNd Copy tHE sectiOn tExt To the clIpboard.
      aCtiVedOCUmEnt.Bookmarks("\SectioN").RANGe.copy

      'CreaTe a new DOcUmENt to pastE tExt From CLIpboaRd.
      DoCUmEnts.Add ("C:\users\sIMaCo\desktop\neW foldeR (4)\nEw.dOtx")
      selecTIon.PAste

  'ReMoves the Break THat is copied at tHE end of the sectIOn, IF AnY.
      seleCtiOn.MoveUp uniT:=wdLINe, CoUnt:=1, EXTeNd:=wDextenD
      SeleCtIOn.dElete unit:=wdCharacteR, COunt:=1
ChAngeFIleOpenDirectOry "C:\Users\sIMACo\DesktoP\New FOlDEr (4)"
      DocNum = DocNum + 1

    with ACtiveDocumENt
    Set r =.Goto(wdGOToPage, wDGoToLast)
    sET r =.Range(r.staRt - 1,.CHarActERS.COunt)
    r.Delete
    EnD wIth

     ACtIveDocuMenT.SaveAs filENaMe:="tEst_" & doCNum & ".doc"
     AcTiveDocuMeNt.clOsE
     'MoVe the SElection To The NeXt sEctioN In the dOcumeNt.
     ApPlIcATioN.BrowseR.neXT
   next I
   ACtIveDOcuMeNt.CloSe saVEchAnges:=wddoNotSavechaNGes
ENd suB

I want tO save each
    {
        e.DetailTabl eView.Data Sourc e =  e. De tail Tabl eView.ParentIt e m["C omment"].Text;
    }
If th er e  isa  b etter  way of do i n g t hi s,  pl ea s elet m e k now.

A :

Perhaps  th ecomment fiel d  n eeds to be  ca st to a list  fi rst?
 Q :
R egextomatch  and u s e a na me betwee nt wo del i mitingw o rd s

I  use this code to sa v e each section  fromth e  i n d ivi dua l document sfroma  Mailin g sg e n era t ed document
S ub BreakOnS e cti on()
 ' Use d  to se t cri te r iafor movingthro ugh the d ocumen t  by sec t ion.
  Appli cat ion .Bro w se r. Tar ge t  =w dB row s eSe ction

 'A  mail  mer g e d ocum ent  end s wit h a section b rea k ne x t p age.   'S ubtr ac tingone fr om th esection count s toperror mes sag e. 
  F or i=  1 To((A cti veDocum ent.Sec t ion s. C o u nt ) - 1)

'Note: Ifad o cu ment doe s note nd  w i th a sec ti onbrea k , 
'sub stit u te  the fol lowing li ne  of cod efor th eone  ab ove:' ForI = 1To Activ eDocu m ent.Sections.C o unt

      'S e le c t  a n d co pythe section  tex t  tothec li pbo a rd.
    Ac t iv e Document.Bookmarks( "\ Sectio n").R ange.Copy

     'Creat e a  new doc umen t  t o  paste text fr om cl ipboard.
    Docu ments .Add ("C :\Users\s i m aco\Desk top \Ne w f old e r  ( 4)\new.dotx")     S electio n.P aste

 'R emo ves  th ebreak tha t is cop ie dat  t heend o f  the sec ti on,  i f a ny.
    Se lecti on.M ov eU p  un it:=wdL i ne , Coun t: =1 , Ex ten d: =wdEx tend      Sele ction.Del ete unit := wd Charact er, Count:=1Ch angeFileOp en Dir ectory " C:\Users \simaco\Desktop\New fol d er (4)" 
     D ocNu m = DocNu m +  1

   W i th Act iveDoc ument 
  S e t r = . G oT o(w dG oToPage, w d G oTo Last) 
   S et r =. Range(r.Start - 1, . Cha racters.Count )
   r . D el ete   En dW ith      ActiveDocu ment.SaveA sF il eName:="te s t_"  &  DocNum  & ".do c"
   Activ eDocument .Close
   'Mo v e  th e selectio n to the  next sec t ion i n  t he do cum ent.
   A pplic ation. B row ser.N ext
  N ext i   Ac ti veDocume nt.Close savechanges:=w dDoNot SaveC han ges
End S ubI w ant to sa ve e ach
 _ _{
   _ __ e.DetailTableView.DataSource_=_e.DetailTableView.ParentItem["Comment"].Text;
  _ }

If there_is a better way_of doing this,_please_let me know.

A:

Perhaps the comment field needs to be cast to a list first?

_Q:

Regex_to match_and_use_a name between two delimiting_words

I use this code to_save each_section from the individual documents from a Mailings_generated_document
Sub BreakOnSection()
 _'Used to set criteria for moving through the document_by section.
   Application.Browser.Target =_wdBrowseSection

  _'A_mail_merge document ends with_a section break next page.
 _ 'Subtracting one from the section_count stop error message.
   For_i = 1 To ((ActiveDocument.Sections.Count) -_1)

'Note: If a document does_not end_with a section break,
'substitute the_following line of_code for_the one above:
'For_I = 1 To ActiveDocument.Sections.Count

 _  _ 'Select and copy the section_text_to the clipboard.
___ _ ActiveDocument.Bookmarks("\Section").Range.Copy

 __ __'Create a new document to paste_text_from clipboard.
     _Documents.Add ("C:\Users\simaco\Desktop\New folder (4)\new.dotx")
__   _Selection.Paste

  'Removes the break_that is copied at the end_of the_section, if_any.
      Selection.MoveUp unit:=wdLine, Count:=1, Extend:=wdExtend
 _    Selection.Delete unit:=wdCharacter,_Count:=1
ChangeFileOpenDirectory "C:\Users\simaco\Desktop\New folder (4)"
_ __  DocNum_=_DocNum +_1

    With ActiveDocument
 _ _Set r =.GoTo(wdGoToPage, wdGoToLast)
  _ Set r =.Range(r.Start_-_1,.Characters.Count)
    r.Delete
 _  End With

  _  ActiveDocument.SaveAs FileName:="test_" &_DocNum_&_".doc"
    _ActiveDocument.Close
     'Move_the selection to_the next section in the document.
 __  Application.Browser.Next
   Next_i
_  ActiveDocument.Close savechanges:=wdDoNotSaveChanges
End Sub

I want_to_save_each