Hi,
I'm looking for a code which open a word document then wait while the user modify this document, and finally resume the program when the user has saved and closed the document.
I'm not sure of being very understandable, but thanks in advance.
Printable View
Hi,
I'm looking for a code which open a word document then wait while the user modify this document, and finally resume the program when the user has saved and closed the document.
I'm not sure of being very understandable, but thanks in advance.
YOu could open your word document in a RichTextbox, but it's not quite easy to edit right there, i'm not sure either if you mean to shell the word documement, you could use Shellexecute api;
[Edited by kedaman on 08-03-2000 at 06:39 AM]Code:'In declarations
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'In code
ShellExecute Me.hwnd, "open", "C:\Worddocument.doc", "", "", 1
Thanks for your answer, but I'm a beginner in VB (VBA actually) and I don't really understand the shellexecute command.
Is there an another way to do this ?
Well it's not too hard to understand...simply aply that code and change the path from "C:\worddocument.doc" to where ever your word document is stored.
Hope that helps,
D!m
I've allready tried it, but I get an error message ,like "error of compilation: member of method or data untraceable".
There's something wrong with the : Me.hwnd
Any idea ?
You have to pass the the handle of the form window, or you could pass 0 if you don't have any forms
Thanks fo your help.