WebQueryOpen issue

Hi

I have an agent thats runs in webqueryopen and it works fine except for one thing. The agent builds a html layout and then populates the fields with data - this works fine but when the text is displayed over the web, the text has been stripped of all carrage returns - it is just one long string

This is the bit that gets the text value

Dim myFieldC As String

myFieldC = ndoc.NewsHeadlineSummary(0)

This is the bit that puts it into htlm to browse on the web

cent = cent & |

| & myFieldC & |

|

Thanks in advance

Subject: WebQueryOpen issue

It probably doesn’t recognise a carriage return so just ignores it.

You could loop through the characters in the field and when you come across a carriage return add
to your output html.

Subject: RE: WebQueryOpen issue

How would i do that ?

Subject: RE: WebQueryOpen issue

Hi Matt

How would I do that ?

Subject: RE: WebQueryOpen issue

Use the InStr function in a loop and test for Chr(13) which is a carriage return.

When you find one you will need to add the text before the carriage return to the output html together with a
. InStr returns the position where the character was found so you can keep track of where you are in the string.

Start searching from position 1, next from the value returned by InStr + 1 and so on until the function returns 0. Use the Mid function to extract the required text.

Subject: RE: WebQueryOpen issue

Hi

I have been hunting high and low - can you help with this with example code

thanks