ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login
    1. Topics
    2. junrustia
    • Profile
    • Following 0
    • Followers 1
    • Topics 1
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    junrustia

    @junrustia

    0
    Reputation
    695
    Profile views
    3
    Posts
    1
    Followers
    0
    Following
    Joined Last Online

    junrustia Unfollow Follow

    Latest posts made by junrustia

    • RE: Need help in creating macro

      Hi @JaredBusch you absolutely understand what i'm trying to do but I already done with this project.

      but anyway thank you for your reply i really appreciate it. maybe a few weeks later i will ask again for your help. hahaha

      posted in IT Discussion
      junrustiaJ
      junrustia
    • RE: Need help in creating macro

      I want to store the found text in the array. but it seem's that i put a wrong code because it only find's letter "i"

      posted in IT Discussion
      junrustiaJ
      junrustia
    • Need help in creating macro

      Hi Guys. this is Jun. one of @Joyfano member i would like to open a new topic about creating macro in ms word.
      I am currently creating a macro in ms word but i'm having a really hard time. this is what i wanted to do:
      i want to create a macro that can search a specific word or text lets say in document1.doc then store the result in an array and after that i will search again in another document lets say document2.doc using the stored result in my first search and if i find the word it will go back to document1.doc to copy the whole paragraph and paste it in document2.doc but take note that it will paste in specific location.
      my code is working fine for only the first paragraph my problem is i want to do that in another paragraph. but that paragraph have different word or text.

      here's my code:

      Sub Mosaic1()
      '

      Dim MyAr() As String
      Dim i As Long
      i = 0
      
      Selection.Find.ClearFormatting
      With Selection.Find
          .Text = "\webfiles*?.pdf"
          .Replacement.Text = ""
          .Forward = True
          .Wrap = wdFindContinue
          .Format = False
          .MatchCase = False
          .MatchWholeWord = False
          .MatchAllWordForms = False
          .MatchSoundsLike = False
          .MatchWildcards = True
      End With
      Selection.Find.Execute
      ReDim Preserve MyAr(i)
      MyAr(i) = Selection
      i = i + 1
      Windows( _
          "Document2.doc" _
          ).Activate
      Selection.Find.ClearFormatting
      With Selection.Find
          .Text = "(i)"
          .Replacement.Text = ""
          .Forward = True
          .Wrap = wdFindContinue
          .Format = False
          .MatchCase = False
          .MatchWholeWord = False
          .MatchAllWordForms = False
          .MatchSoundsLike = False
          .MatchWildcards = True
      End With
      Selection.Find.Execute
      Selection.MoveRight Unit:=wdCharacter, Count:=21
      Selection.MoveDown Unit:=wdLine, Count:=1
      Selection.MoveRight Unit:=wdCharacter, Count:=29
      Windows("Document1").Activate
      Selection.MoveLeft Unit:=wdCharacter, Count:=1
      Selection.MoveDown Unit:=wdLine, Count:=1
      Selection.MoveUp Unit:=wdLine, Count:=2, Extend:=wdExtend
      Selection.Cut
      Windows( _
          "Document2.doc" _
          ).Activate
      Selection.PasteAndFormat wdPasteDefault
      Selection.TypeParagraph
      Selection.MoveDown Unit:=wdLine, Count:=1
      Selection.MoveRight Unit:=wdCharacter, Count:=4
      Windows("Document1").Activate
      Selection.MoveDown Unit:=wdLine, Count:=1
      

      End Sub

      posted in IT Discussion vba macro word
      junrustiaJ
      junrustia