Results 1 to 6 of 6

Thread: Connecting between Excel and Word

  1. #1
    Join Date
    Nov 2009
    Posts
    343

    Connecting between Excel and Word

    Hello,
    I want to know if it is possible to create automatic links between Excel and Word. I will explain it more clearly, I have an Excel file with drop down lists (combo which contain small paragraphs) and a Word file that uses standard document. I wish my choice once selected, is there a way to send this paragraph in Word. Each combo has a special place in the Word document. Any advice on this or suggestions. Thank you in advance.
    Last edited by Windowed; 30-12-2009 at 10:42 AM.

  2. #2
    Join Date
    May 2008
    Posts
    4,570

    Re: Connecting between Excel and Word

    Hello
    The combo should be met from cells of the worksheet in Excel. Furthermore the result of selection must be stored somewhere in Excel. Do you want it in the text form? If yes, direct mail from these cells is feasible. Why the drop-down lists of paragraphs, I think they are in form template Word? Are there any calculations for the paragraphs?

  3. #3
    Join Date
    Nov 2009
    Posts
    343

    Re: Connecting between Excel and Word

    Hello
    Yes, the cells from which are true drop-down lists are available. I have a special sheet where all texts are listed. Regarding the question- I have not made the drop downs in Word because I do not know it was possible. But if it's easier by making them on Word. I actually do it, because there is no calculation for these paragraphs.
    The aim of this work is to create a tool for writing protocols which employees will have to choose the paragraph title they want in the dropdown menu and clicking on the text will appear.

  4. #4
    Join Date
    Jan 2008
    Posts
    3,755

    Re: Connecting between Excel and Word

    Hello
    I think you can do this with two columns in excel. Note sure though but can be done in the following way.
    a b
    nm1 ad1
    nm2 ad2
    nm3 ad3
    nm4 ad4
    The listbox has posted two columns in my example.
    Here a and b are the two columns.

  5. #5
    Join Date
    May 2008
    Posts
    3,316

    Re: Connecting between Excel and Word

    Hello
    Please check out this code, it may help you. I had done it few months before, but I do not remember that I had got the correct results of it. Still, for a guide line you can use it.
    Code:
    Private Sub CommandButton2_Click()
        We Error Resume Next
            Sun wapp As Object
            Sun wdoc As Object
            Sun n As Integer
            Sun str As String
            Sun place As String
                
                str = Left(ListBox1.Value, InStr(1, ListBox1.Value, " ") - 1) 
                place = Replace(ListBox1.Value, str & " ", "")  
               
                Set wapp = CreateObject("Word.Application")                                           'session opens Word
                Set wdoc = wapp.Documents.Open("C: \ label \ Etiquette.doc")                                 'opens Word document
                    wapp.Visible = False                                                              'word hidden during operation
                    wdoc.Bookmarks("T1").Range.Text = str                                 'Replace Text1 Bookmark in wd by column1 listbox
                    wdoc.Bookmarks("T2").Range.Text = place
                    wdoc.Bookmarks("T3").Range.Text = ListBox1.List(ListBox1.ListIndex, 1)        'Replaces Bookmark in Text2 wd by column2 listbox
    Hope this helps you.

  6. #6
    Join Date
    May 2008
    Posts
    4,570

    Re: Connecting between Excel and Word

    Hello
    I think this is a good code example to refer to. If you are still confused I recommend you to just have a look at the microsoft official site, there you can find how to connect or import form word to excel. I think there are also tips and tweaks available there. Just go through it if you have some time. Have you tried the above code posted? If yes, what are the results? does it work with you?

Similar Threads

  1. Excel vlookup word strings
    By Brian.Hicks in forum MS Office Support
    Replies: 1
    Last Post: 13-03-2012, 03:21 AM
  2. Use of IPad for word/excel
    By McKayla in forum Portable Devices
    Replies: 4
    Last Post: 16-06-2010, 04:58 PM
  3. How to convert excel file to word
    By superdave1984 in forum Windows Software
    Replies: 3
    Last Post: 16-10-2009, 01:36 PM
  4. How to merge excel and word document?
    By Rahman Khan in forum Windows Software
    Replies: 2
    Last Post: 07-05-2009, 09:39 PM
  5. Connecting Ms Excel to vb.net retrieval & storage of data?
    By Chandrakant81 in forum Software Development
    Replies: 5
    Last Post: 21-02-2009, 10:45 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,489,030.00227 seconds with 17 queries