+ Reply to Thread
Results 1 to 35 of 35

Draft letters from various sheets of excel

  1. #1
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Draft letters from various sheets of excel

    Sir

    i am attahing sample workbook which contains everything like data req and result''
    kindly see and provide suitable macro vba
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Anybody if has some better idea to do this,,kindly suggest- i just want to automate this process of letter generation from excel

    so that i can make letters for diff office code in column b in our excel with their data containg header and footer that we want in our letter

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,725

    Re: Draft letters from various sheets of excel

    If I were to do this, I would use the mail merge feature of WORD and have Excel provide the variables.

    Here is one tutorial but there are many others, just google "WORD Mail Merge"

    http://office.microsoft.com/en-us/wo...001034920.aspx
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Sir

    i know mail merge -problem is that

    in mail merge -like i have more than one records for a particular office/branch then for i single office/branch separate letter with single entries will be generated

    shall i sent so many letters to a single branch/office containing one entry per letter,is it logical

    that is why i have used code to make sheet of every office/branch in main sheet and filter their records in their sheet and want a vba so that their letters with their consolidated entry can be generated

    kindly try to understand my problem and help me in this direction

  5. #5
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,725

    Re: Draft letters from various sheets of excel

    I apologize, but I don't understand your issues. Please try to explain step by step with examples. Your spreadsheet was not clear and was very confusing.

  6. #6
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Sir
    no need of apology

    I am elaborating my req as under:

    row 1 in my sample sheet is header of my file

    column b of the sample haves the various office code of my company

    now what i have done is i used a code which creates as much of sheets with in the workbook as much of office codes were there in column b

    and placed their relevant records in their respective sheets

    now what i want is somehow a macro/vba can seprately generate letters on the basis of numeric sheets present which my earlier macro has created in the same workbook( that means except sheet1 rest sheet like name as 6 12 etc
    so letters by name 6 ,12 will be genarated keepin their records as it is including header
    on more problem is that i want a common header and footer

    like my letter will start from my company logo

    then to the manager 6,12 branch like wise

    then after my excel sheet record

    i wnat to add some lines then a signatory space

    i need macro for this purpose ,so if i have a letter format ready like we do in mail maerge and then place the records

    here the diff will be that if the multiple records are there for a office then all the records will be in same single letter /multiple letters for each record will not be geneated

    "if need further elaboration then kindly tell"

  7. #7
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    I think that i have elaborated my req very well now sir


    so kindly help me by giving a code for this....thanx in advance

  8. #8
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Sir

    in apologies if writing bit early but i am waiting so eagerly for my code of this req

  9. #9
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    I have search ,such threat is not any where-from this forum,so many other people having prob will get solution for this....

  10. #10
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Is there anybody else/gurus who can give macro for this purpose???

  11. #11
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    As i was told that my threat has been referred to forum gurus so i was rest assured that i will have the code soon...as the problem/req is bit complex so waiting waiting and waiting...writing from excel to word is not so much diff but i needed seprate letter for each office and multiple entres in same letter is tricky and hence expecting reply from forum gurus...if writing early i apologies

  12. #12
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    I was told that the matter has been referred to forum gurus since then i am waiting sir

  13. #13
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2505 Win 11
    Posts
    24,725

    Re: Draft letters from various sheets of excel

    It may be time to seek an alternative means to get your data as you desire as no one has stepped forward with a solution. It can mean any one of several things.
    1. There is not an Excel solution
    2. Your explanation of the issue is not clearly understandable
    3. The time necessary to achieve a viable solution is to great for any volunteer. You may have to seek professional paid help.
    4. You have not shown any effort to complete the task yourself and therefore no one is willing to commit to this project.

    I think it is time for you to re-think what you want, how you want to achieve it and what you are willing to do to complete it.

  14. #14
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Looking like no body else (no expert/guru) is interested ,what has happened i am unable to get that.....any body plzzzz

  15. #15
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Draft letters from various sheets of excel

    That code seems to be written by myself.
    Post a sample worksheet with your desired result for sheet5.

  16. #16
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Thank you very much jindon that you showed the interest atleast,i will be greatful if you will help me here too

  17. #17
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Sir attaching a sample,,as you helped me earlier ,plz help me this time too plzzz...

    This time i dont want separte sheets on the same workbook

    i want that in the same folder where my workbook 11 is there i can got documents letter sample as defined in sample attached with the name of the sheet

    i means my sample ex letters with name as 5,16,25,12 in the same folder with the same described sample and data poertaining to them

    it will be a great help sir

  18. #18
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Sample is attched plz see
    Attached Files Attached Files

  19. #19
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Draft letters from various sheets of excel

    Not really sure.
    Please Login or Register  to view this content.

  20. #20
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Sir code is giving compilation error...

    ambiguous name detected issheet exists
    Attached Images Attached Images

  21. #21
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    no problem its ok i have used the code suggested by you but the problem hasnt solved yet...

    as now my excel starts from row19

    above and below the space is left right but the problem is the req text etc..

    like in evry letter we will have to write every thing....then what is the benefit

    sir

    actually let me describe the reason behind this thought...

    we all use mail merge to generate various letters from a excel data..

    but when multiple records exist for every or multiple entries ....only mail merge doesnt work...as mail merge generate seprate letter for each entry

    so that is why ....i am thinking for some advance version of doing mail merge ...

    can you suggest me a code for this

  22. #22
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    So i thought that i will use a code to generate separate sheets first in the same workbook as my sample 11 book is doing and then somehow if i could get a code which can insert my separte sheets in a selected format of letter

    like i already prepare a letter and like mail merge i use that letter as a sample and ....variou sheet's data moved in the form of that letters
    and as many letters can be generated as many sheets were there in the workbook

  23. #23
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    I mean for each sheet generated by code ......letters containing data of that sheet with sample format can be generated with sheet name

  24. #24
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Draft letters from various sheets of excel

    I don't think I understand your problem, so wait for someone else to come in to help you.

  25. #25
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Sir
    no body else is showing interest plz help me...

    Let me simplify my issue

    i want despite of separate sheets for column b ,is it possible to have separte letters for column b on the same folder where i have this workbook

    document letters are req in place of sheets containing records

  26. #26
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Draft letters from various sheets of excel

    Hello ROHAN999,

    as now my excel starts from row19
    I have changed it for you to Start in Row1. See attached.

    I cannot help you with you Mail-Merge issue.

    Regards
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  27. #27
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Please Login or Register  to view this content.
    THIS IS THE CODE WHICH GENERATE TEXT FILE FROM LIST OF EXCEL

    KINDLY HELP ME NOW SO THAT RATHER THAN GENARATING CONSOLIDATED SINGLE NOTE PAD

    IT BREAKS AS PER NO OF OFFICE NOTES

  28. #28
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Anybody who can help me to alter/modify this code...

    I just want that my this code nerate seprate nodepad rather than running...

  29. #29
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Anybody who can help me to alter/modify this code...

    I just want that my this code nerate seprate nodepad rather than running...

  30. #30
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Can any body help

  31. #31
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Draft letters from various sheets of excel

    No error here.
    Attached Files Attached Files

  32. #32
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: Draft letters from various sheets of excel

    Dups. deleted

  33. #33
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Looking forward

  34. #34
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    Code is absolutly doing well but my company and the rest of matter is not coming in every letter.....(letter means sheets after breaking)

  35. #35
    Forum Contributor
    Join Date
    03-11-2013
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    736

    Re: Draft letters from various sheets of excel

    I meant to say that whtevr is written in a format each letter should copy /have the same text logo list every thing

    and the pertaining data from the req row should only change

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Excel VBA to open an email draft saved on Desktop
    By Lycn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-02-2015, 06:01 PM
  2. New to Excel creating a draft board that is sortable
    By CJJ1984 in forum Excel General
    Replies: 8
    Last Post: 04-26-2012, 04:22 AM
  3. [SOLVED] excel crashed before saving. Where is draft of file?
    By km in forum Excel General
    Replies: 1
    Last Post: 04-25-2006, 05:20 PM
  4. [SOLVED] Does anyone know how to put a watermark DRAFT on an excel spreads.
    By TNTraining in forum Excel General
    Replies: 1
    Last Post: 04-04-2005, 01:06 PM
  5. [SOLVED] how do i put a draft watermark on an excel document?
    By juliholmes in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 02-16-2005, 01:06 PM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1