Need to Macro Find and replace

SuperDVS
08-18-2003, 01:45 PM
Hello all,

I am sure we are all aware of the problems with MS Word Mail Merge and dynamic URL's

i am trying to mass email about 280 people with a URL that is formed from values in an access database.

when i try to form the url in the emails... it comes out looking fine, but being useless, like so

http://www.site.com/default.asp?var1=result1&var2=result2 etc is shown as the hyperlink... but the actual hyperlink is as follows:

http://www.site.com/default.asp?var1=<<result1>>&var2=<<result2>>

for all the records.

since this is a flaw in MailMerge, i was thinking that i could solve this by making a macro to go through all of the emails and do the following...

1) find the string that started with http:// and ended with whatever
2) highlight and copy that string
3) replace the malformed hyperlink (http://www.site.com/default.asp?var1=<<result1>>&var2=<<result2>>) with the actual text that was just copied

the problem is, i have no idea where to start on something like this. I would have to assume that something could be written in VB, but i need some advice or perhaps some snippets oh how to start this progect...

Any help is greatly appreciated.

CarlR
08-19-2003, 02:14 PM
SuperDVS,

When you say a macro to loop through all the emails -- do you mean all of the Word documents that you intend to send as emails? All of the pages in a single Word document? Or are you actually referring to draft emails in Outlook?

CarlR

SuperDVS
08-19-2003, 04:56 PM
SuperDVS,

When you say a macro to loop through all the emails -- do you mean all of the Word documents that you intend to send as emails? All of the pages in a single Word document? Or are you actually referring to draft emails in Outlook?

CarlR


i mean the word documents... the emails never actually "see" outlook, with the exception of the outbox as they aresent one by one during the merge completion. I need some sort of macro to go through all of the word documents.

hell, i dont even mind merging to 280 word documents B4 sending them as email, but doing this doesnt solve my problem of the malformed hyperlink.

any clues?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum