+ Reply to Thread
Results 1 to 5 of 5

Mailmerge Search & Replace

  1. #1
    Registered User
    Join Date
    12-22-2009
    Location
    Pune, India
    MS-Off Ver
    Excel 2003
    Posts
    30

    Mailmerge Search & Replace

    HI,
    I am using the macro to mailmerge data from Excel to word. When merge is done I am finding it difficult to find a specific word and replace it with other word. Below is the code i am using. Fins and replace string is not working in this code.

    Please can any one help me on this one.

    Please Login or Register  to view this content.
    Last edited by PooH; 07-19-2010 at 01:27 PM. Reason: Added Code tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    re: Mailmerge Search & Replace

    Hello Pooh,

    The reason for the code not working is simple. You can not use predefined object constants when using Late Binding. You will need to replace all the Word constants with their actual values.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    12-22-2009
    Location
    Pune, India
    MS-Off Ver
    Excel 2003
    Posts
    30

    re: Mailmerge Search & Replace

    @ Leith - Thanks for the reply, I tried changing the code but still am not able to get it done.
    I am not sure what i am missing..

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    re: Mailmerge Search & Replace

    Please Login or Register  to view this content.
    Last edited by snb; 07-20-2010 at 04:37 AM.

  5. #5
    Registered User
    Join Date
    12-22-2009
    Location
    Pune, India
    MS-Off Ver
    Excel 2003
    Posts
    30

    re: Mailmerge Search & Replace

    Yeap this worked. Thanks snb

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1