Mass Editing Hyperlinks

J

JimR

I am attempting to mass the hyperlinks contained on presentation. For
example, withan address of::
http://webprinters.lasalle.na.abnamro.com/confirm.asp?srv=USPSTRYTOC06&name=USPRTRY136215
I am attempting to edit the portion of the string containing USPSTRYTOC06 to
USPSTRYTOC01. I can access the correct shape properties utilizing the
following code:

For Each s In ActivePresentation.Slides
For Each h In s.Hyperlinks
OldAddress = h.Address
FoundText = h.Address.Find(FindWhat:="USPSTRYTOC06")
snwew = OldAddress.Replace("USPSTRYTOC06", "USPSTRYTOC01")
Next
Next

However, I can get nether the Find nor the Replace to work. Needless to
say, I would really like to get the replace to work. If anyone has any
suggestions, I would be greatfull.
 
J

jimr

Steve Rindsberg said:
As long as you're using PPT2000 or later, this should do it:


h.Address = Replace(h.Address,"USPSTRYTOC06","USPSTRYTOC01")


-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================


I thank you for your reply. Unfortunatly, when I execute the code, I recieve that following compile error: "Wrong number of arguments or invalid property assignment", with the Replace argument highlighted.

Any suggestions would be appreciated.
 
J

jimr

jimr said:
Any suggestions would be appreciated.

Please ignore my previous post. I suffered from short term brain damage and
gave my sub an illegal name. Your solution works. Thank you very much!!!!
 
H

Hans W. Hofmann

On Mon, 25 Apr 2005 05:23:02 -0700, "JimR"
8<--------
Hi,

where does your syntax come from?
not VBA like
h.Address is a String not an object
For Each s In ActivePresentation.Slides
For Each h In s.Hyperlinks
Replace(h.Address,"USPSTRYTOC06", "USPSTRYTOC01")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top