Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 469
Default Hyperlink to open Word File

copied your code removed some even befor removal got error file not found. I
must be doing something wrong can not seem to locate error. Would you look at
code and see if you can locate error. Noted in post reply that it worked fine.
Thanks

Option Explicit

Sub test_Desc1()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "A:\desc.doc"

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub


"Dave Peterson" wrote:

Maybe you could use a macro to open the document readonly.


Option Explicit
Sub testme()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "c:\my documents\word\test.doc"
'or even point to a name in the worksheet
'myWordDocName = ActiveSheet.Range("b1").Value

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

You could use a button from the forms toolbar and assign it this macro.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

cartman101 wrote:

I have set up a hyperlink in Excel to pen a word file. However the word file
is set to give the read only prompt with option of a password to modify the
document.
I want to open the file read only but would prefer not to have the dialoge
box when the file is opened from within Excel.

Is there any way to modify the Hyperlink to allow this?

Alternate methods of achieving the same outcome are always welcome.

Regards

Mike


--

Dave Peterson

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Hyperlink to open Word File

If you're getting a message like:

A:\desc.doc doesn't exist

Then you don't have a disk in drive A that contains the file named desc.doc in
the root directory.

Maybe it's a typo in the name or maybe you forgot to enter the folder name????

ps. It's a pretty bad idea to work directly off the A: drive for any office
application. I'd put that file somewhere on a harddrive or a network drive.

Curt wrote:

copied your code removed some even befor removal got error file not found. I
must be doing something wrong can not seem to locate error. Would you look at
code and see if you can locate error. Noted in post reply that it worked fine.
Thanks

Option Explicit

Sub test_Desc1()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "A:\desc.doc"

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

"Dave Peterson" wrote:

Maybe you could use a macro to open the document readonly.


Option Explicit
Sub testme()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "c:\my documents\word\test.doc"
'or even point to a name in the worksheet
'myWordDocName = ActiveSheet.Range("b1").Value

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

You could use a button from the forms toolbar and assign it this macro.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

cartman101 wrote:

I have set up a hyperlink in Excel to pen a word file. However the word file
is set to give the read only prompt with option of a password to modify the
document.
I want to open the file read only but would prefer not to have the dialoge
box when the file is opened from within Excel.

Is there any way to modify the Hyperlink to allow this?

Alternate methods of achieving the same outcome are always welcome.

Regards

Mike


--

Dave Peterson


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 469
Default Hyperlink to open Word File

agree that A is not for usual use. only useing for testing. A:\desc.doc can
be opened by going to A:\desc.doc and click on it and it opens. Went to A via
my computer. This is why I don't get it The file is there.

"Dave Peterson" wrote:

If you're getting a message like:

A:\desc.doc doesn't exist

Then you don't have a disk in drive A that contains the file named desc.doc in
the root directory.

Maybe it's a typo in the name or maybe you forgot to enter the folder name????

ps. It's a pretty bad idea to work directly off the A: drive for any office
application. I'd put that file somewhere on a harddrive or a network drive.

Curt wrote:

copied your code removed some even befor removal got error file not found. I
must be doing something wrong can not seem to locate error. Would you look at
code and see if you can locate error. Noted in post reply that it worked fine.
Thanks

Option Explicit

Sub test_Desc1()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "A:\desc.doc"

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

"Dave Peterson" wrote:

Maybe you could use a macro to open the document readonly.


Option Explicit
Sub testme()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "c:\my documents\word\test.doc"
'or even point to a name in the worksheet
'myWordDocName = ActiveSheet.Range("b1").Value

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

You could use a button from the forms toolbar and assign it this macro.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

cartman101 wrote:

I have set up a hyperlink in Excel to pen a word file. However the word file
is set to give the read only prompt with option of a password to modify the
document.
I want to open the file read only but would prefer not to have the dialoge
box when the file is opened from within Excel.

Is there any way to modify the Hyperlink to allow this?

Alternate methods of achieving the same outcome are always welcome.

Regards

Mike

--

Dave Peterson


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Hyperlink to open Word File

I'd guess that the file named looked like desc.doc, but was actually different.

If you open the file in MSWord, then look at File|Properties|General tab, do you
see desc.doc?

Maybe try renaming it to something else would help diagnose the problem.

Curt wrote:

agree that A is not for usual use. only useing for testing. A:\desc.doc can
be opened by going to A:\desc.doc and click on it and it opens. Went to A via
my computer. This is why I don't get it The file is there.

"Dave Peterson" wrote:

If you're getting a message like:

A:\desc.doc doesn't exist

Then you don't have a disk in drive A that contains the file named desc.doc in
the root directory.

Maybe it's a typo in the name or maybe you forgot to enter the folder name????

ps. It's a pretty bad idea to work directly off the A: drive for any office
application. I'd put that file somewhere on a harddrive or a network drive.

Curt wrote:

copied your code removed some even befor removal got error file not found. I
must be doing something wrong can not seem to locate error. Would you look at
code and see if you can locate error. Noted in post reply that it worked fine.
Thanks

Option Explicit

Sub test_Desc1()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "A:\desc.doc"

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

"Dave Peterson" wrote:

Maybe you could use a macro to open the document readonly.


Option Explicit
Sub testme()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "c:\my documents\word\test.doc"
'or even point to a name in the worksheet
'myWordDocName = ActiveSheet.Range("b1").Value

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

You could use a button from the forms toolbar and assign it this macro.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

cartman101 wrote:

I have set up a hyperlink in Excel to pen a word file. However the word file
is set to give the read only prompt with option of a password to modify the
document.
I want to open the file read only but would prefer not to have the dialoge
box when the file is opened from within Excel.

Is there any way to modify the Hyperlink to allow this?

Alternate methods of achieving the same outcome are always welcome.

Regards

Mike

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 469
Default Hyperlink to open Word File

Dave:
Just to let you know it does work.
Problem: Don't know how this is went to another computer and file came up as
desc.doc.doc on my computer it showed desc.doc. So now I am go to try to
finish.
Thanks so much for your support.



"Dave Peterson" wrote:

If you're getting a message like:

A:\desc.doc doesn't exist

Then you don't have a disk in drive A that contains the file named desc.doc in
the root directory.

Maybe it's a typo in the name or maybe you forgot to enter the folder name????

ps. It's a pretty bad idea to work directly off the A: drive for any office
application. I'd put that file somewhere on a harddrive or a network drive.

Curt wrote:

copied your code removed some even befor removal got error file not found. I
must be doing something wrong can not seem to locate error. Would you look at
code and see if you can locate error. Noted in post reply that it worked fine.
Thanks

Option Explicit

Sub test_Desc1()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "A:\desc.doc"

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

"Dave Peterson" wrote:

Maybe you could use a macro to open the document readonly.


Option Explicit
Sub testme()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "c:\my documents\word\test.doc"
'or even point to a name in the worksheet
'myWordDocName = ActiveSheet.Range("b1").Value

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

You could use a button from the forms toolbar and assign it this macro.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

cartman101 wrote:

I have set up a hyperlink in Excel to pen a word file. However the word file
is set to give the read only prompt with option of a password to modify the
document.
I want to open the file read only but would prefer not to have the dialoge
box when the file is opened from within Excel.

Is there any way to modify the Hyperlink to allow this?

Alternate methods of achieving the same outcome are always welcome.

Regards

Mike

--

Dave Peterson


--

Dave Peterson



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Hyperlink to open Word File

Open windows explorer on the pc that did not show .doc.doc

Then tools|folder options|view tab
Uncheck "Hide extensions for known file types"

And you'll be able to see the .doc.doc stuff inside windows explorer.

This is a pc setting, so you may want to do it for all pcs that you have.

When this setting is checked, it can mean trouble to the user.

If the file looks like it's named:
Curt.jpg
It could be really:
curt.jpg.exe
or
curt.jpg.bat
or
curt.jpg.vbs
or...

And do bad things when you click on it to "view the picture".

Curt wrote:

Dave:
Just to let you know it does work.
Problem: Don't know how this is went to another computer and file came up as
desc.doc.doc on my computer it showed desc.doc. So now I am go to try to
finish.
Thanks so much for your support.


"Dave Peterson" wrote:

If you're getting a message like:

A:\desc.doc doesn't exist

Then you don't have a disk in drive A that contains the file named desc.doc in
the root directory.

Maybe it's a typo in the name or maybe you forgot to enter the folder name????

ps. It's a pretty bad idea to work directly off the A: drive for any office
application. I'd put that file somewhere on a harddrive or a network drive.

Curt wrote:

copied your code removed some even befor removal got error file not found. I
must be doing something wrong can not seem to locate error. Would you look at
code and see if you can locate error. Noted in post reply that it worked fine.
Thanks

Option Explicit

Sub test_Desc1()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "A:\desc.doc"

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

"Dave Peterson" wrote:

Maybe you could use a macro to open the document readonly.


Option Explicit
Sub testme()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "c:\my documents\word\test.doc"
'or even point to a name in the worksheet
'myWordDocName = ActiveSheet.Range("b1").Value

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

You could use a button from the forms toolbar and assign it this macro.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

cartman101 wrote:

I have set up a hyperlink in Excel to pen a word file. However the word file
is set to give the read only prompt with option of a password to modify the
document.
I want to open the file read only but would prefer not to have the dialoge
box when the file is opened from within Excel.

Is there any way to modify the Hyperlink to allow this?

Alternate methods of achieving the same outcome are always welcome.

Regards

Mike

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 469
Default Hyperlink to open Word File

Hide was checked it showed after.
Still having a problem tho. useing A it seems to work when I go to folder
where I run excel data from. It then puts word doc behind excel sheet
sometimes. Also it does not open file it does open word with a blank brown
screen. Know I have right locations or would not do even this. Could this
have any thing to do with my useing excel 2000. Computer that I went to I
think is later version than mine. This is sure bugging me. I steped in over
my head a little.
Thanks


"Dave Peterson" wrote:

Open windows explorer on the pc that did not show .doc.doc

Then tools|folder options|view tab
Uncheck "Hide extensions for known file types"

And you'll be able to see the .doc.doc stuff inside windows explorer.

This is a pc setting, so you may want to do it for all pcs that you have.

When this setting is checked, it can mean trouble to the user.

If the file looks like it's named:
Curt.jpg
It could be really:
curt.jpg.exe
or
curt.jpg.bat
or
curt.jpg.vbs
or...

And do bad things when you click on it to "view the picture".

Curt wrote:

Dave:
Just to let you know it does work.
Problem: Don't know how this is went to another computer and file came up as
desc.doc.doc on my computer it showed desc.doc. So now I am go to try to
finish.
Thanks so much for your support.


"Dave Peterson" wrote:

If you're getting a message like:

A:\desc.doc doesn't exist

Then you don't have a disk in drive A that contains the file named desc.doc in
the root directory.

Maybe it's a typo in the name or maybe you forgot to enter the folder name????

ps. It's a pretty bad idea to work directly off the A: drive for any office
application. I'd put that file somewhere on a harddrive or a network drive.

Curt wrote:

copied your code removed some even befor removal got error file not found. I
must be doing something wrong can not seem to locate error. Would you look at
code and see if you can locate error. Noted in post reply that it worked fine.
Thanks

Option Explicit

Sub test_Desc1()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "A:\desc.doc"

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

"Dave Peterson" wrote:

Maybe you could use a macro to open the document readonly.


Option Explicit
Sub testme()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "c:\my documents\word\test.doc"
'or even point to a name in the worksheet
'myWordDocName = ActiveSheet.Range("b1").Value

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

You could use a button from the forms toolbar and assign it this macro.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

cartman101 wrote:

I have set up a hyperlink in Excel to pen a word file. However the word file
is set to give the read only prompt with option of a password to modify the
document.
I want to open the file read only but would prefer not to have the dialoge
box when the file is opened from within Excel.

Is there any way to modify the Hyperlink to allow this?

Alternate methods of achieving the same outcome are always welcome.

Regards

Mike

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Hyperlink to open Word File

Maybe the word doc is just off the screen.

Inside word, try window|Arrange All
to see if you can see it.

Curt wrote:

Hide was checked it showed after.
Still having a problem tho. useing A it seems to work when I go to folder
where I run excel data from. It then puts word doc behind excel sheet
sometimes. Also it does not open file it does open word with a blank brown
screen. Know I have right locations or would not do even this. Could this
have any thing to do with my useing excel 2000. Computer that I went to I
think is later version than mine. This is sure bugging me. I steped in over
my head a little.
Thanks


"Dave Peterson" wrote:

Open windows explorer on the pc that did not show .doc.doc

Then tools|folder options|view tab
Uncheck "Hide extensions for known file types"

And you'll be able to see the .doc.doc stuff inside windows explorer.

This is a pc setting, so you may want to do it for all pcs that you have.

When this setting is checked, it can mean trouble to the user.

If the file looks like it's named:
Curt.jpg
It could be really:
curt.jpg.exe
or
curt.jpg.bat
or
curt.jpg.vbs
or...

And do bad things when you click on it to "view the picture".

Curt wrote:

Dave:
Just to let you know it does work.
Problem: Don't know how this is went to another computer and file came up as
desc.doc.doc on my computer it showed desc.doc. So now I am go to try to
finish.
Thanks so much for your support.


"Dave Peterson" wrote:

If you're getting a message like:

A:\desc.doc doesn't exist

Then you don't have a disk in drive A that contains the file named desc.doc in
the root directory.

Maybe it's a typo in the name or maybe you forgot to enter the folder name????

ps. It's a pretty bad idea to work directly off the A: drive for any office
application. I'd put that file somewhere on a harddrive or a network drive.

Curt wrote:

copied your code removed some even befor removal got error file not found. I
must be doing something wrong can not seem to locate error. Would you look at
code and see if you can locate error. Noted in post reply that it worked fine.
Thanks

Option Explicit

Sub test_Desc1()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "A:\desc.doc"

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.Number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

"Dave Peterson" wrote:

Maybe you could use a macro to open the document readonly.


Option Explicit
Sub testme()

Dim oWord As Object
Dim myWordDocName As String
Dim testStr As String

myWordDocName = "c:\my documents\word\test.doc"
'or even point to a name in the worksheet
'myWordDocName = ActiveSheet.Range("b1").Value

testStr = ""
On Error Resume Next
testStr = Dir(myWordDocName)
On Error GoTo 0
If testStr = "" Then
MsgBox myWordDocName & " doesn't exist"
Exit Sub
End If

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.number < 0 Then
Set oWord = CreateObject("Word.Application")
End If

oWord.Visible = True
oWord.Documents.Open myWordDocName, ReadOnly:=True

Set oWord = Nothing

End Sub

You could use a button from the forms toolbar and assign it this macro.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

cartman101 wrote:

I have set up a hyperlink in Excel to pen a word file. However the word file
is set to give the read only prompt with option of a password to modify the
document.
I want to open the file read only but would prefer not to have the dialoge
box when the file is opened from within Excel.

Is there any way to modify the Hyperlink to allow this?

Alternate methods of achieving the same outcome are always welcome.

Regards

Mike

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Retaining formats grok Excel Discussion (Misc queries) 11 October 31st 06 07:29 PM
Can not open excel file xls. extensions cjshazen Excel Discussion (Misc queries) 1 February 14th 06 01:17 AM
cannot open excel file, please help!!! sunlite Excel Discussion (Misc queries) 0 September 5th 05 05:29 PM
Excel startup switches Randy Excel Discussion (Misc queries) 9 June 14th 05 10:27 PM
Hyperlink in Excel 2000 can't open bookmarked Word 2000 file DCheslock Excel Discussion (Misc queries) 1 May 5th 05 10:46 PM


All times are GMT +1. The time now is 12:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"