MS Excell Querry

Discussion in 'General Software' started by Karanislove, Mar 6, 2006.

  1. Karanislove

    Karanislove It's D Grav80 Of Luv

    Likes Received:
    0
    Trophy Points:
    36
    Is there anybody who could tell me how to make a macro who will open ms word file.
    I did it with xl files and it was working but dont know how to open word file.
     
  2. Impotence

    Impotence May the source be with u!

    Likes Received:
    6
    Trophy Points:
    38
    You want to open a ms word doc in excel?!?
     
  3. Karanislove

    Karanislove It's D Grav80 Of Luv

    Likes Received:
    0
    Trophy Points:
    36
    Yes I want to make a macro for that.
     
  4. Matt555

    Matt555 iMod

    Likes Received:
    98
    Trophy Points:
    48
    I don't know how to do it but let me get it straight for others...

    Do you want to create a button to open an MS Word Document FROM Excel?

    ...or...

    Do you want to open a MS Word Document IN Excel?
     
  5. Karanislove

    Karanislove It's D Grav80 Of Luv

    Likes Received:
    0
    Trophy Points:
    36
    Yes

    ??????
     
  6. Matt555

    Matt555 iMod

    Likes Received:
    98
    Trophy Points:
    48
    By that I meant open a Word Document but have it open in MS Excel and not MS word.
     
  7. Karanislove

    Karanislove It's D Grav80 Of Luv

    Likes Received:
    0
    Trophy Points:
    36
    I got ur piont.
     
  8. Impotence

    Impotence May the source be with u!

    Likes Received:
    6
    Trophy Points:
    38
    Im not very clued up about office macro's... but its only visual basic!

    Have you got the origional code for the xl version? im sure i coudl try to make sense of it? [Is it commented... please say you commented it! (REM's)]
     
  9. Karanislove

    Karanislove It's D Grav80 Of Luv

    Likes Received:
    0
    Trophy Points:
    36
    You can make macro by using codes or their function. I know both of them but none was working for me. I thought may b I m wrong somewhere. Then I decided to post here.
     
  10. Karanislove

    Karanislove It's D Grav80 Of Luv

    Likes Received:
    0
    Trophy Points:
    36
    Here is an example

    Sub Stat_Manager_March()
    '
    ' Stat_Manager_March Macro
    ' Macro recorded 3/3/2006 by karanislove
    '

    '

    Workbooks.Open Filename:= _
    "H:\New Folder\Stat Manager\Stat Manager - March 2006.xls" 'This will open stat manager march2006 xl sheet
    End Sub

    Yea, it seems easy if I would like to change this function to make it workin with word for e.g

    Sub Current_Promotions()
    '
    ' Current_Promotions Macro
    ' Macro recorded 3/12/2006 by karanislove
    '

    '
    Workbooks.Open Filename:= _
    "H:\New Folder\Promotions\Current Promotions.doc" 'it has to open the promotions word file

    End Sub
    I recieve an error message......which I ve attached.

    Its looks damn easy, just write the path of the file but i dont know y its not working......~!
     

    Attached Files:

  11. Impotence

    Impotence May the source be with u!

    Likes Received:
    6
    Trophy Points:
    38
  12. Karanislove

    Karanislove It's D Grav80 Of Luv

    Likes Received:
    0
    Trophy Points:
    36
    I got the right answer


    Sub LatestInformation()
    '
    ' Latest_Information_doc Macro
    ' Macro recorded 3/3/2006 by karanislove

    Set appWd = CreateObject("Word.Application")
    Set doc = appWd.Documents.Open("H:\New Folder\Latest Information.doc")

    End Sub

    i found it here
    Code:
    http://groups.google.com/group/microsoft.public.word.docmanagement/browse_thread/thread/5f93984ad0f97b62/6d6ec66f8308bd9b?lnk=st&q=how+to+open+word+file+in+excel&rnum=2&hl=en#6d6ec66f8308bd9b
    Thanx for giving me ur time
     

Share This Page