J
Julie
Hi
i have a large number of documents (100+) in which hyperlinks need to
be changed. I know that i can do edit / replace on the hyperlinks but
i need to use code as its not a simple change
for example
the following hyperlink address
C:\my documents\methodology documents\drm\drm_010.doc
needs changing to
http://www.govsec.gov.au/index.cfm?fuseaction=drm.drm_010
and
the following hyperlink address
C:\my documents\methodology documents\soc\soc_010_015.doc
needs changing to
http://www.govsec.gov.au/index.cfm?fuseaction=soc.soc_010_015
etc
so i'm working on the theory that i need to open every document in the
directory, determine the first three letters of the filename, display
field codes, edit replace the paths (using the first three letters of
the filename) and removing the .doc extension
am i on the right track ... is there an easier way?
and the bit of code that i'm not sure about is the find & replace bit
- can i use something like:
dim firstthree as string
dim fname as string
dim oldpath as string
dim newpath as string
fname = activedocument.name
firstthree = left(fname, 3)
oldpath = "C:\my documents\methodology documents\" & firstthree &
fname
newpath = "http://www.govsec.gov.au/index.cfm?fuseaction=" &
firstthree & =LEFT(fname,LEN(fname)-4)
find oldpath 'really not sure how to do this
replace newpath
Cheers
JulieD
i have a large number of documents (100+) in which hyperlinks need to
be changed. I know that i can do edit / replace on the hyperlinks but
i need to use code as its not a simple change
for example
the following hyperlink address
C:\my documents\methodology documents\drm\drm_010.doc
needs changing to
http://www.govsec.gov.au/index.cfm?fuseaction=drm.drm_010
and
the following hyperlink address
C:\my documents\methodology documents\soc\soc_010_015.doc
needs changing to
http://www.govsec.gov.au/index.cfm?fuseaction=soc.soc_010_015
etc
so i'm working on the theory that i need to open every document in the
directory, determine the first three letters of the filename, display
field codes, edit replace the paths (using the first three letters of
the filename) and removing the .doc extension
am i on the right track ... is there an easier way?
and the bit of code that i'm not sure about is the find & replace bit
- can i use something like:
dim firstthree as string
dim fname as string
dim oldpath as string
dim newpath as string
fname = activedocument.name
firstthree = left(fname, 3)
oldpath = "C:\my documents\methodology documents\" & firstthree &
fname
newpath = "http://www.govsec.gov.au/index.cfm?fuseaction=" &
firstthree & =LEFT(fname,LEN(fname)-4)
find oldpath 'really not sure how to do this
replace newpath
Cheers
JulieD