Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to insert from a table into a Word 2003 document and email them using Microsoft outlook 2003 4

Status
Not open for further replies.

titoneon

MIS
Dec 11, 2009
335
US
Hi everyone,
I want to accomplish something here but actually i don't know how, i am wondering if i can get help from you.
Well i am still running Microsoft word 2003, Ms Outlook 2003 and VFP 5.0 to create prg, pjx, exe etc.... by the way i also i have VFP 6.0 but it is not installed, but if it is necessary i can install it, depends if you suggest me to do it.
This is what i want to to accomplish:
1- i have a word document that i need to email to a bunch of vendors but in that document i need to insert in a particular location of the document the Vendor name, then email this document to each of these vendor
the document is the same but in that particular location of the document their vendor name has to be inserted and then emailed it using Microsoft outlook 2003 that is setup with a POP3 and SMTP.
2- I have created in vfp 5.0 a table with all vendors name and their respective email.

can any one help me out here with some codes on how to call that word document, insert the vendor name in that particular location of the document and then be able to email it ?

Thanks in advance
 
Hey everyone,
I just want to thanks each and everyone of you for the help, in fact during all these days i have been able to understand and learn a lot things that even when i was reading it, i was not, i hope this have not ended here but what i can say now is that we always learn something new and well.
Thanks
Ernesto
 
Sorry Tamar,

I don't own your book. I said maybe, because I can't kno, ut Ernesto came up with the code after you mentioned chapter 4 in your book, so it seemed like it came from there. The automation book is from 2000, so maybe it could have been more common in those days. Though I remember as I started with VFP6 in 1999 and the first time I automated Word, perhaps in 2001 or 2002 it was already Word.Application I used. It's kind of a relief the book does not have Word.Basic samples, method names like ww7_EditGoTo are not really straight forward. On the other side I can see how Ernesto is torn forth and back on what to use.

Ernesto: If you had VFP7 or higher you would have intellisense and that would make it easy to inspect even new unknown territory, eg doing oWordobj = CREATEOBJECT("Word.Application") in the command window you can then type oWordobj. in the next line and typing the dot will make a combobox appear with selections of what properties, methods and events the word application object offers, and so you don't need to know the word object model to program it, you can even guess what things means and try them out live and see, if it works, not only method names show, but also parameter names and a short tip text about their meaning. The list shrinks, while you type, and many more very nice thing happen via intellisense. Another thing is you type backcolor = and then can click or enter to start the color picker, and after you interactively choose a color you get the RGB() written in your code. This intellisense feature works for VFP classes and much more. You really miss a productivity feature. You miss a lot of things, which would reduce your questions, your need to look up and read references.

And last least, sorry Jrb-Bldr, I was just stressing this out, as most probably the mail adresses Ernesto or his collegue have are already in use for years and are tested in time anyway. It's not a big thing to find out in test runs, if some mail address may cause the outlook automation to popup with a dialog asking for user assitance. In short, when you call oMailitem.send the same things happen, than when you manually click the send button. There is nothing making automation more complicated or error prone than manually sending mails. And that's why I couldn't let that stand on it's own, being misinterpretable.

Bye, Olaf.
 
Olaf,
Yes Tamar is correct, she never covered word.basic but when i realized that i could not use ("Word.Application"), then i started searching for some codes for ("word.basic) and found it, then it worked for me and we the help of all you, i was able to resolve it, i would like to get vfp 9.0, i guess is going to be a big diff. going from 5 to 9, so the learning curve probably will be amazing, the question i have is, is the same enviroment as vfp 5, ie the command window will be there, the menu will be about the same, can we create project, menu forms, reports etc is just about the same ? probably with more feature and others things can be created i guess easy, how much you think i should pay for 9 ? it is also a service pack for it, according to you what should be a good book to really get in track with 9?
Thanks
Ernesto
 
In general VFP is downward compatible and you still have your command window (incuding inellisense / autocomplete as in any code editor), you have project manager and create menus, forms, reports. Yes, that's all there. I can't tell you about the difffernece details because I started with VFP6, but judging that there has been stuff added and I don't remember anything was removed, nothing, that I miss. The difference of VFP6 to VFP9 should be about the same as with VFP5. there is one thing, that has been remove: The activedoc class. Yet you still can CreateObject("activedoc"), so in a way it's just hidden. The VFP9 help also has many chapter merely saying "for downward compatibility only, see ..." with ... pointing to a more modern replacement. And the other big thing is, VFP9 only come as english IDE, shouldn't be a problem for you.

Fair price? I don't know, I think paying the full price would still be fair.

And books? Well, there is a whole series covering "what's new". I think it starts with VFP7 so you have a gap with VFP6, but it shouldn't be large. The help is still a full reference of all modern stuff aside of 2.6 screens and so you find your way around even without any book. You'll have to get used to autocompletion of commands. In the beginning you'll want to turn that off, but don't do it, it is really a time saver and keeps you from typos.

What's much more important is, you can still make use of FLLs (I do use a commtools fll initially done for VFP5) and you can use all the new stuff you find at VFPX, which more and more only works with VFP9 and no earlier versions.

Bye, Olaf.
 
Thanks a lot for the info guys, ANOTHER QUESTION: Do i need to go to first VFP 7, VFP 8 in order to actually start working on 9 ? or i can just simply go to 9 and learn from there what ever i missed from all the previous one ?
Thanks
Ernesto
 
Like Mike said. It's only the books of course only cover differences to the previous versio. You best buy all three books, but you only need to buy VFP9.

Bye, Olaf.
 
Hi Guys,
Well i got VFP 9.0($320.00) and also got the "What's New in Nine Visual Foxpro's lates hits"
i installed it already and also installed sp2,
Question:
1- what other downloads do you recommend for it ?
Thanks
Ernesto
 
What's new in nine also is a chapter of the VFP9 help. But the book is different/more, I think. You should also buy the new in 8 and new in 7 books and start from there, perhaps.

Microsofts latest release was not the SP2, they also released their original enhancements on the way to VFP10, extensions called Sedna, made in VFP code. Some dbi controls also were available with that Sedna extension. Sedna was released for free and led to VFPX.

The Sedna download still is available at [URL unfurl="true"]http://www.microsoft.com/en-us/download/details.aspx?id=8618[/url]
And dbi also still offers it's Sedna components: [URL unfurl="true"]http://www.dbi-tech.com/VisualFoxProSednaComponents.aspx[/url]

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top