Consulting

Results 1 to 13 of 13

Thread: Generate letter buider.doc

  1. #1
    VBAX Regular
    Joined
    Sep 2004
    Posts
    10
    Location

    Generate letter buider.doc

    Dear Gurus..


    I have a task where i am suppose to create a test environment where the macro in ms word shall use the input files from a database server in the form of txt file and create a replica of the information including the rows and columsn as in the database on the ms word.

    in other words a test environment such as in the database server on a ms word,i belive that the earlier programmer has done the codings and even through i try to run it from macro.. in that specific ms word.. it has some errors coming out and I can't see the data and the cloumns but some weird ascii codes..

    Pls do kindly guide me here..
    thanx in ad..

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Can you post the code, or attach the document? Also what is the specific error message.

  3. #3
    VBAX Regular
    Joined
    Sep 2004
    Posts
    10
    Location
    wat does this error means:compiled error
    expected:as

  4. #4
    VBAX Regular Kelly's Avatar
    Joined
    Jun 2004
    Location
    Los Angeles, California
    Posts
    84
    [vba]'Open A copy of letter and populate it
    Construction.BuildLetter Agency1, LetterPath, CCListPath

    'Open A copy of table and populate it
    Construction.BuildTable Agency1, TablePath [/vba]

    I assume "Contruction" is the name of another module... ?
    and "BuildLetter" is a macro stored in the "Construction" module... ?

    Have you used the "Debug -- Step Into" tool? (place cursor inside the macro and press F8) after you F8 past each line of code, look at the document and see what's going on. Maybe you can pinpoint at which line of code your results start to get "ugly."

    Have you written any of this, shreya? or did you inherit the whole thing from someone who is no longer around to explain their process to you?

    Also, when you get the "Compile Error, Expected: As" you should simultaneously be taken to the offending line of code which will be highlighted in yellow. once you see which line it is, hopefully the error will be obvious. Compile errors can usually be simple syntax errors such as a mispelling or an omitted word.

    -Kelly

  5. #5
    VBAX Regular
    Joined
    Sep 2004
    Posts
    10
    Location

    continuing message..

    Dear Gurus..
    actually as per kelly said.. it did higlighted aline in yellow.. which was the very first line in the codings..i belive it was the agency object.. its true on what u said.. the previous person whom had coded this codes has left without even producing any documentations and here i am left with a huge task..


    i shall try to use the tool step into and debug once again.. i recall doing it but it went to the line of agancy object in yellow tag once again..i was blocked on that path after that..any ideas?thx for all the help as i surely need it..

  6. #6
    VBAX Regular
    Joined
    Sep 2004
    Posts
    10
    Location

    site admin

    hi ya all.. is there any poss way that the codes posted in the site by mr tony to be edited.. its a confidential task within the uni students and i dont want cumbersome in future.. thank u in ad for understanding..
    site admin..neeed ur merciful assistance on tis..
    owe u a huge one

    Shreya

  7. #7
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Hi shreya,

    My apologies for posting something I perhaps shouldn't have - I didn't really know what else I could do with it. I have deleted the post.

    If you are getting a compiler error and the Sub line is highlighted yellow, is there another line selected (highlighted blue)?

    It rather sounds like you have part of something and need a reference or another module or both to go along with it. Have you any way at all of finding out any more?
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  8. #8
    VBAX Regular
    Joined
    Sep 2004
    Posts
    10
    Location

    actualcommand

    oh pls..Mr Tony.. do not ask for any apology..u r just being helpfulto me..the probs which i am facing is.. i am suppose to create a test environment inmacros that shallshoot up the info in txt file into a documents that stores in the txt info in tables and columns.

    i have test in put just as name:cccc,ad:5678

    how can input this info into the macro?is there any commands?and in the yellow tag..after executing the comman step into..the tag moves to line:

    On Error GoTo HandleErr

    wat does tis means..i think the previous programmer had some codings probs..
    kindly do assist with ur thoughts

    Shreya

  9. #9
    VBAX Regular
    Joined
    Sep 2004
    Posts
    10
    Location
    Dear"Gurus"



    is it possible for me to attach the word doc here for urview so tat u can find the bug nlet meknow bfr i could start presenting it in the presentation?i am doing this as i belive that miscommunication might occur within my interpretation..

    Thanx

    Shreya

  10. #10
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Yes, shreya, click on the manage attachments button in the additional options area below the box where you enter your post (the 'advanced' one, not the quick reply).

    You cannot attach a document directly - you must zip it first.

    I have received your e-mail with a copy of it but haven't had a chance to look closely at it yet - there's a lot there - and I have some missing references (Groupware Type, Groupwise Address Book, C3PO, Groupwise Client).
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  11. #11
    VBAX Regular
    Joined
    Sep 2004
    Posts
    10
    Location

    Zipped file

    am so sorry as earlier i did not have the winzip with me and just downloaded it..well the groupwise is a email system like lotus..i dont know why did it come to the pic..am sorry to bother u once again but this has been breaking my head for almost 2 weeks now..am so new in VB and havent had much hands on experiences..kindly do assist me..
    thanx Tony an ample..

    Shreya

  12. #12
    VBAX Regular
    Joined
    Sep 2004
    Posts
    10
    Location

    test inputs

    the test inputs are such as below..an example:


    *** I have removed all that data from the very long post and added it as an attached file - I guess it's no use without the document ***
    *** Do you mind if I post the document as well. Just say if its confidential ***

    *** Tony ***

  13. #13
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Hi Shreya,

    I am finding it difficult to do anything with your system. When I run it with the data you posted it fails on the third record when it tries to use data at position 194 of a 183-character record but I have no idea what the data mean and cannot begin to try to correct it.

    Without a lot more information about what it is trying to do I can't really do much more and even then I think it might take more time than I can give it. So I'm afraid I have to say sorry, but I don't think I can be of much more help at the moment.

    If you have specific questions about particular code, many people here will try to help but you seem to have some broad general questions, and other questions which really need some knowledge of your data and systems that people outside your organisation don't have and I suspect they can't be answered in a forum like this. You might find it worth seeking professional consultancy - which you may be able to do via the Pay-For-Answer section of this site - see http://www.vbaexpress.com/forum/forumdisplay.php?f=3
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

Posting Permissions

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