PDA

View Full Version : Wrap everything to a single sentence



thedark123
06-21-2006, 02:05 AM
How to modify this code to appear like in the screenshot...

Now my code can get the values out from the table

ws.Range(ws.Cells(1, 1), ws.Cells(1, 1)).Copy
wdDoc.Paragraphs(wdDoc.Paragraphs.Count).Range.Paste
ws.Cells(3, i).Copy
wdDoc.Paragraphs(wdDoc.Paragraphs.Count).Range.Paste

the Cells(1,1) represents the test data id : TD-VSC-A02A08.01

and in between them how to add a "/"

the Cells(3,i) represents Scenario 1


what i did only shows like that:
http://i6.photobucket.com/albums/y226/thedark123/titleold.gif

desire result:

http://i6.photobucket.com/albums/y226/thedark123/title.gif

fumei
06-21-2006, 06:08 AM
I am truly shaking my head in disbelief. That has to be one of the most badly written posts I have ever seen. You had better learn how to ask for things clearly. Do you even think about what you are writing? Do you think about what you are asking?
the Cells(3,i) represents Scenario 1What the heck does "represent" mean???? If Cells(3,i) contains the text "Scenario 1" then that is not represented! It IS the text.

You post images - I am assuming to be helpful - that do not match what you are asking.

You seem to have no grasp at all of how Word handles text. It seems you do not grasp what a string is. Do you know how to append strings? For it sure seems that is exactly what you want to do. And if your string has line breaks in it...well...take them out!

Have a string variable that takes Cells(1,1), then append Cells(3,i) to it. What will that give you????? Hmmmmm???? Perhaps ONE string with both cell contents? Hmmmm? And gosh if there are no line breaks in it....will it be on one line? Hmmmmmmmmmmmmm?

Your code is weird.

thedark123
06-22-2006, 09:58 PM
Solved thanks ^^

JohnnyBravo
07-19-2006, 07:32 AM
Oh my god - ROFL...

Gerry that has to be one of the funniest damn posts I have ever read. I was digging through the archives to see if I could find an answer to something and stumbled upon this thread. I'm laughing so hard, my office mates as looking at me as if I've gone Koo-Koo... As if Gerry's posting wasn't funnae enough - I love how it ended with the OP coming back to say it was solved...errr.. maybe it wasn't solved and he didnt' want to take on Gerry's wrath again! :D

fumei
07-19-2006, 10:12 PM
Wrath?????? What wrath? A slight touch of sarcasm I'll admit, but wrath? No, hardly.

As an aside, I would have liked to have seen what "solved" meant.

mdmackillop
07-19-2006, 11:22 PM
As an aside, I would have liked to have seen what "solved" meant.
Agreed. The purpose of the forum is to share knowledge, but InTheDark seems unwilling to oblige.

JohnnyBravo
07-20-2006, 12:28 PM
Agreed. The purpose of the forum is to share knowledge, but InTheDark seems unwilling to oblige.
I think that's why he's "InTheDark". :tongue2: