Results 1 to 7 of 7

Thread: Resume after the user has modified a file.

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    21

    Question

    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.

  2. #2
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    21

    Unhappy

    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 ?

  4. #4
    Fanatic Member Dim's Avatar
    Join Date
    Jul 2000
    Posts
    620
    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
    Dim

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    21

    Arrow

    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 ?

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    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.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    21

    Wink

    Thanks fo your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width