Consulting

Results 1 to 4 of 4

Thread: Importing "relevent" data from excel columns to word doc?

  1. #1

    Importing "relevent" data from excel columns to word doc?

    Hello all!

    I am a new poster on this forum and, despite my best efforts, am still hopless at excel!
    I was wondering if I could trouble someone for assistance? I'm trying to devise a VBA which will transfer the relevant data from an excel (2007) stock sheet (in my case; columns A,B,C,J,K and N) to a word template document. I've played around with this excel sheet so that when stock is low on a particular item (row) it will be highlighted, I've used a filter to make this more clear and a "Quantity to order" number will be generated. I'm also planning in future to hyperlink all the materials to the relevant supplier so that the most up to date price can be obtained fairly quickly. That's all went relatively smoothly...I think...

    My problem is that I'm trying to create a VBA which will allow me to transfer multiple rows of items low on stock (up to a max. of 8 items) to a word document I use to order materials in on. Is this even possible? I've tried a few things I've read in forms but I'm getting no-where. Code errors by the dozen!

    I'm looking for any help at all...I only intended to make a simple format for an older guy in our stores to just punch in the numbers in stock, as he's not very good with computers, but now I've developed a grudge against this and I'm determined to fix it/beat it!

    Thanks in Advance!
    Attached Files Attached Files
    Last edited by martinbhoy; 08-02-2011 at 04:55 AM. Reason: Attached example if anyone would like a look, explains itself better than I can!

  2. #2
    I suppose I should also attach the word document I'm trying to transfer the data to as I think this may be what is causing a few of my problems. Some of the columns in the table aren't used till after recepit of items, (i.e. no data transfered into these columns from excel) so I don't know if that is "throwing" the VBA I tried? it's all very confusing!
    Attached Files Attached Files

  3. #3
    VBAX Guru Kenneth Hobs's Avatar
    Joined
    Nov 2005
    Location
    Tecumseh, OK
    Posts
    4,956
    Location
    Welcome to the forum!

    I don't see any code to see what you have tried. Obviously, that would need to be a XLSM file.

    I have not worked with tables but that should be easy enough. A Mail Merge could probably do it. There are some other ways to do it as well. Bookmarks and form fields are easy ways to fill an MSWord template. See if these give you some ideas.

    'TypeText method
    ' http://www.excelforum.com/excel-prog...ml#post1946784
    ' http://www.excelforum.com/showthread.php?p=1946784
    ' http://vbaexpress.com/forum/showthread.php?p=169877
    ' http://vbaexpress.com/forum/showthread.php?t=24693

    'Copy from Excel, paste to Word
    'Lucas, http://vbaexpress.com/forum/showthread.php?p=178364

    'FormFields
    ' http://www.mrexcel.com/forum/showthread.php?p=1639696
    ' http://www.mrexcel.com/forum/showthread.php?t=333200

    'Add Hyperlink to Bookmark
    ' http://www.excelforum.com/excel-prog...ml#post2006430
    'Steiner, http://www.vbaexpress.com/kb/getarticle.php?kb_id=126
    'Colin_L, http://www.mrexcel.com/forum/showthread.php?t=358054

    'Save OLEObject as MSWord Document
    ' http://vbaexpress.com/forum/showthread.php?t=21619

    'Add Table to MSWord
    ' http://vbaexpress.com/forum/showthread.php?t=23975
    ' http://vbaexpress.com/forum/showthread.php?p=168731

    'Import Word Tables
    'vog, http://www.mrexcel.com/forum/showthread.php?t=382541

    'Save OLEObject as MSWord DOC
    ' http://vbaexpress.com/forum/showthread.php?t=21619

    'Get Optionbutton info from MSWord DOC
    ' http://vbaexpress.com/forum/showthread.php?t=22454

    'FindReplace Text
    ' http://www.excelforum.com/excel-prog...-ms-excel.html

    'Bookmarks
    ' http://vbaexpress.com/forum/showthread.php?p=185718

  4. #4
    WOW! Thats alot of links really fast! Thank you very much for your help, and the welcome. I'll try sifting through the info you've given me and hopefully find something that suits.
    Thanks again!

Posting Permissions

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