Mass Editing Hyperlinks

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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:

As long as you're using PPT2000 or later, this should do it:
For Each s In ActivePresentation.Slides
For Each h In s.Hyperlinks

h.Address = Replace(h.Address,"USPSTRYTOC06","USPSTRYTOC01")
 
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.
 
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!!!!
 
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")
 
Please ignore my previous post.

Will do. Ignorance is one of my specialties!
I suffered from short term brain damage and
gave my sub an illegal name. Your solution works. Thank you very much!!!!

Great! Thanks for the followup, Jim.
 
where does your syntax come from?
not VBA like
h.Address is a String not an object

Hi Hans,

I'm assuming Jim previously did:

Dim h as Hyperlink

So h is an object, h.Address is a string

Replace takes strings as arguments, so it works as below:
 

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

Back
Top