Using Stream.WriteText with a variable

I’m attempting to generate an email with a html link in it. I want to open the doc by using the unid, but just not having any luck - I’m getting the desired text and everything works - just the doclink is broken…

Call stream.WriteText(|<a href=“http://server/folder/DB.nsf” + unid + “?OpenDocument”>Link Text|)

I’ve got a handle on the unid and the actual document - but how do I use either of these variables using WriteText ??

Subject: Using Stream.WriteText with a variable

The URL has to look like:

http://server/folder/db.nsf/viewname/unid

The ?OpenDocument is optional (?Open is the default server command), but the slashes and the viewname are not.

Subject: RE: Using Stream.WriteText with a variable

Hi Stan - so we meet again! Thanks for your ever presence to help us rookies out!

I realized after I posted that I need a view name too, but my issue is getting the unid variable enclosed inside the quotes.

Call stream.WriteText(|Link Text|)

When I use this line of script, and click on the link generated, I only get as far as the view or the second enclosing quotes. How do I combine this to get the unid variable in there? When I use it trying to concatenate the unid - I get this in my URL - view/%20+%20unid

Subject: RE: Using Stream.WriteText with a variable

Ah, that’s because you’re using your delimiters wrong. A vertical bar is closed only by another vertical bar, curly brackets only by other curly brackets, and so on. What you want between the parentheses is this:

|<a href="http://server/folder/DB.nsf/view| + unid + |>Link Text|

The way you’ve got it now, your script is treating the "+ unid + " bit as a literal rather than as an expression.

Subject: RE: Using Stream.WriteText with a variable

M. thanks for your response!

Where do I close the href string? I don’t see the ending " in your example… Sorry for being so dense…!

Subject: RE: Using Stream.WriteText with a variable

My bad:

|Link Text|

Subject: RE: Using Stream.WriteText with a variable

Thanks again for your response M… I eventually figured it out after placing it just about everywhere in that sting…