Results 1 to 3 of 3

Thread: Open Word doc

  1. #1
    Join Date
    Jul 2003
    Location
    Portugal
    Posts
    111

    Unanswered: Open Word doc

    Is it possible to replace ("C:\MyDoc.doc") by the link I have in a field?

    Here is the sample:

    Dim objWord As Word.Application
    Set objWord = CreateObject("Word.Application")

    With objWord
    .Visible = True
    .Documents.Open ("C:\MyDoc.doc")
    (...)

    Any idea?
    Thanks.

    Ruas

  2. #2
    Join Date
    Jul 2003
    Posts
    26
    Have you tried this.

    Dim FileLoc as String
    FileLoc = FielwithLink.value

    Dim objWord As Word.Application
    Set objWord = CreateObject("Word.Application")

    With objWord
    .Visible = True
    .Documents.Open (FileLoc)
    (...)

    That should do what you are asking.
    Life's a bowl of punch, go ahead and spike it.

  3. #3
    Join Date
    Jul 2003
    Location
    Portugal
    Posts
    111
    Thank you for your sugestion.
    But it doesn't work. I have a word file (c:\mydoc.doc). The field give me this information (that must be parsed as you sugested to FileLoc):
    ..\mydoc.doc

    Here is the problem. It can't be resolved. But your sugestion is very good indeed.

    Thank you again and regards.

    Ruas

    Originally posted by DawG
    Have you tried this.

    Dim FileLoc as String
    FileLoc = FielwithLink.value

    Dim objWord As Word.Application
    Set objWord = CreateObject("Word.Application")

    With objWord
    .Visible = True
    .Documents.Open (FileLoc)
    (...)

    That should do what you are asking.

Posting Permissions

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