insert hyperlink window doesn't open

K

Kim

Hi,

I have a form with a textfield and a browse button. I want to open the
inserthyperlink window and choose a file, after that the link should
appear in my textfield.

My code:

Private Sub KnopBrowse_Click()

Me.txt_Document.SetFocus

RunCommand acCmdInsertHyperlink

End Sub

When i use this code i get the following error : InsertHyperlink isn't
available at the moment.

Is my code correct ?
 
A

Allen Browne

Double-check the Name of your text box.

Perhaps the field is named txt_Document, but the text box is named something
else.
 
K

Kim

I double-checked it, the text box is named txt_Document
I tried using doc as name but i still get the same error.
 
Top