PDA

View Full Version : Generate letter buider.doc



shreya
09-07-2004, 10:41 PM
Dear Gurus.. :006:


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..

Jacob Hilderbrand
09-07-2004, 11:05 PM
Can you post the code, or attach the document? Also what is the specific error message.

shreya
09-08-2004, 07:36 AM
wat does this error means:compiled error
expected:as

Kelly
09-10-2004, 06:07 PM
'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

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 (http://kellyjones.netfirms.com/visualbasic/vbawelcome.html)

shreya
09-12-2004, 08:56 PM
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.. :yes


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..

shreya
09-12-2004, 09:02 PM
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

TonyJollans
09-13-2004, 12:20 AM
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?

shreya
09-13-2004, 06:39 AM
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

shreya
09-13-2004, 08:34 AM
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

TonyJollans
09-13-2004, 10:42 AM
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).

shreya
09-13-2004, 11:05 AM
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:006:

shreya
09-13-2004, 11:10 AM
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 ***

TonyJollans
09-13-2004, 04:06 PM
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