You should be able to use some kind of control. I don't remember if there is a toolbox control for viewing office apps with VB or not.... you can also use scripting to do this.... but that will probably load word. There is a way though, using com objects.... I'll let you know if I find anything more.
Many thanks for your recent help. The coding you provided worked amazingly. Will is still work if the document is password protected? Also the word documents I have are both a shared resource and password protected, will the code still work or will I need to code in the permissions/password?
to open password protected doc. we should know the password of the doc.
set file ->save as (select doc file)->tools > general options . . in pass word to open give pwd as sri, select readonly -. reenter pwd
the try this code.
Private Sub Command1_Click()
Dim objWord As Word.Application
' this would be faster with a "with objWord" but for clarity I use the explicit
Set objWord = New Word.Application
objWord.Visible = True
objWord.Documents.Open "c:\sql performance tips.doc", , , True, "sri"
@jeff.sibal thank you for your time writing this reply. However I would like to ask you that next time you check date of original post as like in this case, originally posted in 2005, original poster either already found solution or would not be interested in it after such a long time.
One more think I would like to ask you is to use code tags when you post any code, as
YOUR CODE HERE
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...