Converting text to a field

A

alan.pritchard

I have a specialised database program in which one field holds the url
of any items available online. When
I output the data as a Word document, the url just appears as text,
instead of as a hyperlink.

Looking at a normal Word document in more detail, I see that it
actually
looks like { HYPERLINK "url" }

I have tried outputting the field with the url by wrapping the
{ HYPERLINK " AND " }
around the field (which I can do, and have done in a similar way for
html
output) but Word does not recognise the field as a HYPERLINK field.

Is there a better way to do this. Maybe via search/replace? If
necessary. I can always put out some unique character to replace.

Is it even possible to do this?

Alan Pritchard
 
G

Guest

Alan:

You can't wrap your URL in plain text. Those curly braces are a display
artifact that indicate a field in Word. I don't know what you'd do in
whatever software you're using, but in VBA you'd have to say something like:

ActiveDocument.Hyperlinks.Add _
Anchor:=Selection.Range, _
Address:="http://www.url.com/", _
SubAddress:="", _
ScreenTip:="Screen tip", _
TextToDisplay:="Display text"

Bear

Windows XP, Word 2000
 
A

alan.pritchard

Alan:

You can't wrap your URL in plain text. Those curly braces are a display
artifact that indicate a field in Word. I don't know what you'd do in
whatever software you're using, but in VBA you'd have to say something like:

ActiveDocument.Hyperlinks.Add _
Anchor:=Selection.Range, _
Address:="http://www.url.com/", _
SubAddress:="", _
ScreenTip:="Screen tip", _
TextToDisplay:="Display text"

Bear

Windows XP, Word 2000

Thanks for that. I solved the problem in the end, by outputting
to .html (where I had got the hyperlinks working the way I wanted ),
and then processing the .html file with PDFCreator. Works perfectly &
I have a .pdf file, which is what I was working towards, anyway.
 

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