|
-
Aug 3rd, 2000, 03:50 AM
#1
Thread Starter
Junior Member
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.
-
Aug 3rd, 2000, 04:37 AM
#2
transcendental analytic
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;
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
[Edited by kedaman on 08-03-2000 at 06:39 AM]
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 3rd, 2000, 05:00 AM
#3
Thread Starter
Junior Member
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 ?
-
Aug 3rd, 2000, 05:09 AM
#4
Fanatic Member
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
-
Aug 3rd, 2000, 05:13 AM
#5
Thread Starter
Junior Member
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 ?
-
Aug 3rd, 2000, 05:36 AM
#6
transcendental analytic
You have to pass the the handle of the form window, or you could pass 0 if you don't have any forms
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 3rd, 2000, 06:57 AM
#7
Thread Starter
Junior Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|