From: Bwig Zomberi on
galactic wrote:
> Bwig,
>
> Yes I believe the format is the Microsoft RTF - specifically I need to
> be able to paste a ready made URL - complete with hidden A tag - into
> Outlooks Signature box. The Outlook Signature interface (outlook
> version 2003 11.8) will only accept a url as a Microsoft RTF Piece!
> (Tools->Options->tabMailFormat->Signiatures.
> It will not accept - say an "A" tag.. any HTML just get's copied as
> "shown" HTML tags... but It will accept a Microsoft Document copied
> URL from Excel or Word.. My business requirements are to be able to
> leverage this type of copy straight from a web page...
> I learned a little Rtf language, but need to tell the copy mechanism
> this is the type of format I'm using...

If you copy a HTML-encoded or RTF-encoded hyperlink, it is still text.

In IE, it is possible to right-click a link and select the built-in
"Copy hyperlink" menu option. You could then paste the URL anywhere.
Does the Outlook Signature box not accept it? It should. I can't tell
for sure, as I do not have Outlook.

I do know that Outlook uses Word as the web page rendering engine but
something that has been copied to they Clipboard should be available for
paste operations anywhere. Just confirm the above does not work.


--
Bwig Zomberi
From: Bwig Zomberi on
galactic wrote:
> Bwig,
>
> Yes I believe the format is the Microsoft RTF - specifically I need to
> be able to paste a ready made URL - complete with hidden A tag - into
> Outlooks Signature box. The Outlook Signature interface (outlook
> version 2003 11.8) will only accept a url as a Microsoft RTF Piece!
> (Tools->Options->tabMailFormat->Signiatures.
> It will not accept - say an "A" tag.. any HTML just get's copied as
> "shown" HTML tags... but It will accept a Microsoft Document copied
> URL from Excel or Word.. My business requirements are to be able to
> leverage this type of copy straight from a web page...
> I learned a little Rtf language, but need to tell the copy mechanism
> this is the type of format I'm using...

If you copy a HTML-encoded or RTF-encoded hyperlink, it is still text.

In IE, it is possible to right-click a link and select the built-in
"Copy hyperlink" menu option. You could then paste the URL anywhere.
Does the Outlook Signature box not accept it? It should. I can't tell
for sure, as I do not have Outlook.

I do know that Outlook uses Word as the web page rendering engine but
something that has been copied to they Clipboard should be available for
paste operations anywhere. Just confirm the above does not work.


--
Bwig Zomberi
From: Bwig Zomberi on
Bwig Zomberi wrote:
> galactic wrote:
>> Bwig,
>
> If you copy a HTML-encoded or RTF-encoded hyperlink, it is still text.
>
> In IE, it is possible to right-click a link and select the built-in
> "Copy hyperlink" menu option. You could then paste the URL anywhere.
> Does the Outlook Signature box not accept it? It should. I can't tell
> for sure, as I do not have Outlook.
>
> I do know that Outlook uses Word as the web page rendering engine but
> something that has been copied to they Clipboard should be available for
> paste operations anywhere. Just confirm the above does not work.
>
>

I am sorry for the double post. My computer time was a day late and I
did not see my first post.

By "hidden hyperlink", do you mean the URL is different from the innerText?

Then, you need to write an external JS for hyperlinks.

The JS could capture the hyperlink with
external.menuArguments.event.srcElement

You could then create a range and use execCommand, as mentioned earlier,
to copy the hyperlink as is to Clipboard.



--
Bwig Zomberi
From: galactic on

> You could then create a range and use execCommand, as mentioned earlier,
> to copy the hyperlink as is to Clipboard.
>
> --
>   Bwig Zomberi

Bwig,

I believe the only thing that will work for my purposes is the be able
to paste some ready-made Rtf that I create into the clipboard.

My simple question is - how to tell the I.E. clipboard that what is
has is Rtf instead of plain text...

If there is a way it probably lies in

window.clipboard.setData("Text", copied.htmlText);

where text is Rtf.. but it won't recognize that command... maybe it's
something else... I can't seem to find the different options..

-William
From: Bwig Zomberi on
galactic wrote:
> My simple question is - how to tell the I.E. clipboard that what is
> has is Rtf instead of plain text...
>
> If there is a way it probably lies in
>
> window.clipboard.setData("Text", copied.htmlText);
>
> where text is Rtf.. but it won't recognize that command... maybe it's
> something else... I can't seem to find the different options..

setData method allows text or URL data. Anything else would be a
violation of the browser security model implemented by IE. In ordinary
desktop application, the same setData method allows data in several
other formats. You can't expect all that to be available in the limited
scope given for VBScript/JScript. To bypass that model, you will need a
signed and user-approved ActiveX.

The best way is, as I mentioned, earlier is to use the functionality
already provided by the browser to copy rich text, not RTF, into
clipboard. And, get clipboard data pasted into Outlook.

If required, you can write a custom Outlook Add-on to process this
clipboard RTF data (in text). Add-On code will not be restricted, unlike
browser security model. I however feel it is totally unnecessary. If you
have dug your heels in RTF, well it is up to you.

--
Bwig Zomberi