Results 1 to 5 of 5

Thread: Unable to run a macro ...

  1. #1

    Thread Starter
    Addicted Member trasher's Avatar
    Join Date
    Jun 2001
    Location
    Quebec city, Qc, Canada
    Posts
    255

    Unable to run a macro ...

    My program runs on a NT network.
    On my machine and many others , it works fine. But, on some other machines, it don't.
    My problem is : I want to open a word document, and then, execute some macros of this document. But, on some machines it says 'Unable to open this document'
    It bugs when I try to execute the macro.

    Code:
    Private Sub Command1_Click()
    Dim wrdApp As Word.Application
    Dim wrdDoc As New Word.Document
    
        Set wrdApp = CreateObject("Word.Application")
                  
        Set wrdDoc = wrdApp.Documents.Open("\\ldpro\public\Olivier\Test.doc")
        
        'it bugs here :        
        wrdApp.Run ("Project.NewMacros.Move1")
                
        wrdApp.Selection.Text = "Test"
    Do someone have an idea ??

  2. #2
    Si_the_geek
    Guest
    Two thoughts:

    1) do the users with problems have macro protection on?

    2) do all users have the same version of word? if not, did you save the document in the EARLIEST version available?

  3. #3

    Thread Starter
    Addicted Member trasher's Avatar
    Join Date
    Jun 2001
    Location
    Quebec city, Qc, Canada
    Posts
    255
    The users are all using word 97

    I tried on a machine where the macro protection is off.
    But it don't works...

    I really don't know what it is..
    Heads will roll...

  4. #4
    Si_the_geek
    Guest
    maybe the document is already open by another user?

    have you tried opening the same document in word manually, and then running the macro?

  5. #5

    Thread Starter
    Addicted Member trasher's Avatar
    Join Date
    Jun 2001
    Location
    Quebec city, Qc, Canada
    Posts
    255
    thanks for your help,
    I resolved my problem simply by adding an On error Resume Next statement. All works well now..
    I think it's a dictionnary error or something like that in Word..
    The error wasn't about my macros...
    Heads will roll...

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