PDA

View Full Version : Solved: Inserting text in Word Document



Saintcools
07-03-2006, 05:27 AM
Hi
I have a small problem. Can anyone tell me how to insert text before and after the first and last paragraph in a word document.i am passing a folder as input and all the documents in that folder should have the text inserted into the documents in that folder.Awaiting your answer and thanks for your help.

fumei
07-03-2006, 10:15 AM
The code at the end of your post "Inserting HTML Tags Into Word Document" does exactly that. Try using it.

fumei
07-03-2006, 09:26 PM
Now if you need help in putting together the actual strings you want to insert...that is a different question. If you need help with that...ask.

Saintcools
07-04-2006, 05:59 AM
Hi Fumei
Thanks for the respnonse and all i need is that the example text to be replaced with the HTML tags that all and if u can give me a program which match my example program in "INSERTING HTML TAGS" post then it will be of great help.thanks your ur response once again.

fumei
07-04-2006, 08:38 PM
Sheeesh. I really, really, really, suggest you do a bit of study on how to use VBA.....and Word.
all i need is that the example text to be replaced with the HTML Really???????

Then replace it! If you think I (or anyone else) is going to tell how to do that...well someone else may. But I will not. Replacing it is rock bottom basic, and if you don't know how to do that, well you are going to have problems.

Look. As I have stated REPEATEDLY, it is text. Read my lips. TEXT.

The little code on the other post puts in a string (OF TEXT) at the start of the document; then a string (OF TEXT) at the end.

So............change the string of text I put as an example. Put your own string of text. And again...I am NOT going to tell you how to do that. It is a string. That is...TEXT. Look up string in Help. Go to other posts and see how strings are made.

That is all there is to it.

Change the example text to the text you want. There is no way I am going to do that for you. If you can't figure out that very very very very very basic use of VBA....shrug.