Hypelink base

D

Dkline

I need to set a the "Hyperlink base" in a new file's properties. File is
built from scratch by a macro.

Using object browser I found Word.WdBuiltInProperty.wdPropertyHyperlinkBase

But I can't simply set it to "\\Server03"

I get this error message:
A constant represents a read-only value. This error has the following causes
and solutions:

a.. You tried to assign a new value to a variable declared with Const, or
to a type library constant.
If you need to assign a new value, declare an ordinary variable of the
type desired and assign your value to that variable. If you need a variable
with a restricted set of values, you can declare an enumeration, using the
Enum statement.

At bottom of Object Browser it shows "Const wdPropertyHyperlinkBase = 29
(&H1D)":

How can I set this property to \\Server03?
 
J

Joost Verdaasdonk

Hi,

For you're UNC, something like:
ActiveDocument.BuiltInDocumentProperties
(wdPropertyHyperlinkBase) = \\Server03

Have Fun,
Joost Verdaasdonk
 
J

Joost Verdaasdonk

Wrapup problem over here! ;-)

For you're UNC, something like:
ActiveDocument.BuiltInDocumentProperties _
(wdPropertyHyperlinkBase) = "\\Server03"

Have Fun,
Joost Verdaasdonk
 

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