Close
Duke shfaqur rezultatin -9 deri 0 prej 3
  1. #1
    i/e larguar Maska e ahmed_tr
    Anėtarėsuar
    23-11-2003
    Vendndodhja
    TIR
    Postime
    98

    Exclamation VBA code (macro) per mail merge!

    prsh!

    Kam nje problem me mail merge, pasi perfundoj mail merge qe te me ndaje cdo rekord ne dokument me vete me nxjer nje flete teper ne cdo dokument.
    ne vijim codi macro:
    Kodi:
    Sub SplitMergeLetter()
    ' splitter Macro modified to save individual letters with
    
    ' information from data source. The filename data must be added to
    
    ' the top of the merge letter - see web article.
    
     
    
    Selection.EndKey Unit:=wdStory
    Letters = Selection.Information(wdActiveEndSectionNumber)
    Selection.HomeKey Unit:=wdStory
    Counter = 1
    While Counter < Letters
         Application.ScreenUpdating = False
         With Selection
    
              .HomeKey Unit:=wdStory
               .EndKey Unit:=wdLine, Extend:=wdExtend
              .MoveLeft Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    
         End With
         sName = Selection
         Docname = "D:\My Documents\Test\Merge\" & sName & ".doc"
    
         ActiveDocument.Sections.First.Range.Cut
         Documents.Add
    
        'Documents are based on the Normal template
    
        'To use an alternative template follow the link.
         With Selection
             .Paste
             .HomeKey Unit:=wdStory
             .MoveDown Unit:=wdLine, Count:=1, Extend:=wdExtend
             .Delete
         End With
         ActiveDocument.SaveAs FileName:=Docname, _
         FileFormat:=wdFormatDocument
         ActiveWindow.Close
         Counter = Counter + 1
         Application.ScreenUpdating = True
    Wend
    End Sub
    flm per cdo informacion.

  2. #2
    i/e regjistruar Maska e valdetshala
    Anėtarėsuar
    15-03-2008
    Vendndodhja
    Pejė-Republika e Kosovės
    Postime
    2,363
    te kisha keshilluar te postosh ne http://www.forumishqiptar.com/forumdisplay.php?f=161
    te arti i programimit
    Me respekt,

    Valdet Shala

  3. #3
    i/e larguar Maska e ahmed_tr
    Anėtarėsuar
    23-11-2003
    Vendndodhja
    TIR
    Postime
    98
    Le ta kalojne si teme administratoret.

Regullat e Postimit

  • Ju nuk mund tė hapni tema tė reja.
  • Ju nuk mund tė postoni nė tema.
  • Ju nuk mund tė bashkėngjitni skedarė.
  • Ju nuk mund tė ndryshoni postimet tuaja.
  •