خرید بک لینک

-4 down vote favorite

I am writing a macro in Ms word 2003.

I have an table wherein I have content which is in form of Pictures (word copied from PDF) & text .. In the table cell, Before the content , I am creating a nested table of cell 1 .

But before the creation of table, when i m creating space for it, sometimes the picture in the content is treated as Bullet & appears three times in addition to original. I want to to "de-bulletise" the Bullet/PictureContent...so that no repetition of the content-picture.

here's my sample code , which creates nested table of 1 cell in the 3 rd row , 2th column of main table cell.. Currently I am able to detect the existence of the "bullet" But cant "de-bulletize" ( i could remove the "Bullet" But want to preserve/normalise it as it's part of my data)

Sub checkBulletCreateTable132()
 '
 ' checkBulletCreateTable132 Macro
  '
  '
  Dim cellPara As Word.Paragraph
  Dim BulletCount As Integer


' to check if bullet picture in the cell


   ActiveDocument.Tables(1).Cell(3, 2).Range.Select

   BulletCount = 0

   With Selection
        For Each cellPara In .Paragraphs
      ' to check if bullet picture

         If cellPara.Range.ListFormat.ListType = _
           WdListType.wdListPictureBullet Then

            BulletCount = BulletCount + 1

     '------ all bullets removed …But Its DATA LOSS.. so no using 
    '  following line code
    'Selection.Range.ListFormat.RemoveNumbers NumberType:=wdNumberParagraph

       End If

   Next
 End With
 MsgBox "BulletcCount" & BulletCount

'adding table at the start of cell.. above  the existing content…

  Selection.Collapse
  Selection.TypeParagraph
  Selection.TypeParagraph
  Selection.MoveUp Unit:=wdLine, count:=1
 ActiveDocument.Tables.AddRange:=Selection.Range,NumRows:=1,NumColumns:=    _    1, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
 wdAutoFitFixed

End Sub

- - , .

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 9 اسفند 1394 ساعت: 16:53

صفحه بندی