Results 1 to 10 of 52

Thread: ब्लॉग कोशिश कर रहा है بلاگز کی ک*Trying Blogs

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,402
    Rep Power
    10

    German Telecom ( Deutsch Telekom FreeMail t-online.de ) Copy Paste HTML code work around

    German Telecom ( Deutsch Telekom ( Freemail t-online.de ) ) Copy Paste HTML code work around

    I had a problem for a long time when copying manually via the clipboard from Microsoft Word ( or from most other sources ) into my main Email Internet tab Browser Program , t-online.de ( German Telekom Free mail).
    The problem started suddenly, close to the time that some update/ changes were made to the Program a few years ago.
    The problem was that usually most formatting was lost, and only simple plain b/w text came into the browser.
    Previously, most formatting , such as text color, text fonts , test size etc. were maintained such that the final E mail main body as seen and sent, looked very similar to as the prepared message in the Word document. This maintaining of format was / is still the case when pasting manually into gmail and many other places. ( This conversion to simple b/w is usually only seen when pasting into very simple basic text reply windows which supported no formatting )
    Formatedtext.JPG ; https://imgur.com/A9Sq5Y1 PastedInGermanEMail https://imgur.com/CZRH5jj
    Formatedtext.JPGPastedInGermanEMail.JPG
    ( Here is the same after pasting into gmail: PastedIn gmail.Jpg https://imgur.com/CzqCJ7y )



    I noticed the issue in a different situation, and was able to do a simple workaround that spread some light on the issue.
    This post gives the background to the situation.
    The next post explains the workaround. ( The workaround by passes pasting into the German Email Reply/Editor Window, but the sent and received Email does not suffer from the problem of loss of formatting ).

    The issue in a different situation..- The situation
    I answered a Forum question here recently, ( http://www.excelfox.com/forum/showth...kbooks-at-once ), and a spin off was a further insight into the issue.
    The thread concerned automating sending of an Email with attachments using ( Excel ) VBA.
    The successful solution involved sending directly to any Email the complete protocols, messages, HTML code string etc.. etc.. that any Email program, such as Email Internet tab Browser Program , t-online.de , would in end effect “send” out along the internet. ( The final solution was not dependent on having any Email Program available or open. )

    The VBA Program to send Email solution:
    It was a completely independent “stand alone” solution: Part of the program “ took in “ the main body / main content of the message, that is to say what a user would normally manually type in and/ or paste in. ( As seen in the above screenshots )
    ( This main body is what I personally might prepare, for convenience, ( and for purposes of having a back up ) , in a Word document and then copy and paste manually across. That copied across would then be sent , and the Word document is then effectively my back up copy of the sent message )

    Supplying the main Email message body to the code:
    This main body can be supplied to/ given within the code
    either as…….
    _ a simple text string, like pseudo __ = “ Hello,” & vbCrLf &this is my message. “ __ , which would give a final message received like
    Hello,
    This is my message
    That text can also in code typically be supplied in a single String type variable in a typical code part like:
    Dim strText As String
    _ Let strText = "Hello," & vbCrLf & " this is my message"
    Code:
    Dim strText As String
    _  Let strText = "Hello," & vbCrLf & " this is my message"
    or………

    _ alternatively it could be given as HTML code supplied similarly in a long string variable. That string variable would contain a long string of all the HTML necessary to create text, table, pictures and all possible formatting. That HTML type code can usually be read by most “internet type” or general computer communication type software such as to be able to show a complete formatted page or pages just as one might see in an internet web site or a large Microsoft Word document containing all sorts of formatting including tables, pictures, etc.. etc.. ( I chose to use this second HTML string giving way). This sort of coding is the most common language, at least up until recent years, in computer communication generally.
    ( By the way htm, HTML ,XHTML, html are more or less the same – it is all to do with coding which mostly consists of ” tag pairs” made with pointy brackets https://www.youtube.com/watch?v=1gLh...D6F7E289625976 )
    Making/ writing the .htm code string
    If I was a fluent computer HTML expert then I could just write out the htm equivalent of the message with formatting that I wanted to send by Email. I am not, and I don’t need to be: There are many ways to get the code, such as free converters on the internet which give the code if you paste in what you finally want into a window. ( All software I have tried have not suffered from loosing the format when I paste in to their window )
    But something even more convenient is available as standard with Microsoft Word:
    A simple practical solution was found to be to take advantage of the possibility of saving a normal Word ( file, normally saved with the extension .docx ) , with a file extension of .htm
    SaveAs Word.JPG Save As Word doc to htm.JPG https://imgur.com/h7XFAQX https://imgur.com/vhRE9CC
    This somehow saves the document primarily in some version of HTML coding language. ( I have no idea what it normally does with the .docx extension – probably a trade secret ). A small amount of coding was then all that was necessary to convert that .htm file into a single text string of the type required for the Email sending code with the option of supplying the main body in HTML format. ( That coding is a line like, pseudo _ strText = GetTheFileAsATextStreamandReadItAll_ )

    HTML is one of the main languages used in internet communication, and most internet browsers and Email programs use this. ( In the case of the first simple test string option, ( = “ Hello,” & vbCrLf &this is my message. “ ) , that given text string would probably be converted initially by some software into HTML coding before being further used . ( Hence it is more efficient to use the htm option in the first place )

    The long HTML string is rather difficult to “see” in its single string form as it is literally an extremely long sting text with pointy bracket HTML code. To a first approximation, this long string of information forms the bulk of what is actually “sent down the internet line”.
    No programmer could ever examine easily such a long string of coding. The coding is therefore organised neatly with things like the _ vbCrLf _ used in simple text strings to give a new line.
    Because of this last point, if you open such a HTML file with a simple text editor then you see the coding neatly laid out.
    For example, this is a screen shot of a simple Word document, which I made and then saved as .htm:
    ProMessageTelekom.JPG : https://imgur.com/zn3BGWj
    ProMessageTelekom.JPG
    “ProMessageTelekom.docx” : https://app.box.com/s/pumcahipuhjbl59ka7lb3qv8i682kcwc
    “ProMessageTelekom.htm” : https://app.box.com/s/vfz0y102bikl9hrka6dlgqyotlrttlpi

    If I right click on the .htm File in the explorer window, then I can choose to open this file in a simple text editor , ( rather than by using Word, which may be the default, - but note always: You might find that by default it opens on your Internet browser, - that is because , as noted, that browser software has as its main job reading HTML coding and converting it into the text , pictures, tables etc. that you can “see” )
    OpenProMessageHTMLWithTextEditor.JPG : https://imgur.com/4zev9Kv
    OpenProMessageHTMLWithTextEditor.jpg
    Opening the file in a text editor will give you ( towards the end ) the actual coding relevant specifically to “making” that seen text. The relevant part is in between the “pointy bracket code tag pair” named _ div class=WordSection1 ___ /div __ That section is all that I am interested in: All the other stuff is I expect a lot of stuff specific to a Word Document or maybe even some other complicated stuff. I don’t know
    ProMessageHTMLInTextEditor.JPG : https://imgur.com/eTUd17q
    ProMessageHTMLInTextEditor.jpg

    Last part of HTML code for File “ProMessageTelekom.htm” :
    See here:
    http://www.excelfox.com/forum/showth...0525#post10525




    Using code instead of Email Window to send Email ( with attachments )
    The codes for doing this are described from here: http://www.excelfox.com/forum/showth...0518#post10518
    The end result is , simplified, as follows:
    The .htm file is “sent” by the code along the internet line as a HTML code string
    rather than
    pasting into the Email Editor and hitting the send button manually

    The German Telekom Email Editor / Email Program is not used by this particular code . ( that step is effectively bypassed). So, the issue of the format loss occurring when pasting into the German Telekom Email Editor / Email Program is not present

    However: The received Email in German Telekom suffered a similar problem.
    Using the same Word file example again:
    This was the File used to produce the HTML code string to send
    ProMessageTelekom.JPG : https://imgur.com/zn3BGWj
    This came on as expected in most places, for example in gmail:
    ProMessageArrivedAt gmail UsingCodeToSend.jpg : ProMessageTelekom.JPG : : https://imgur.com/u57kRD7



    But.
    .. The same sent to a German Telekom t-onlone.de address came on with a similar format loss problem to that experienced when pasting into the German Telekom Email Editor / Email Program
    ProMessageRecievedAT tOnLinede UsingCodeToSend.JPG : https://imgur.com/h4wJVXd



    _.______________________



    So that this post was in way of an introduction.

    In the next post is the bit relevant to the issue with pasting into a German Telekom Email Window..
    Last edited by DocAElstein; 03-01-2018 at 10:33 PM.
    ….If you are my competitor, I will try all I can to beat you. But if I do, I will not belittle you. I will Salute you, because without you, I am nothing.
    If you are my enemy, we will try to kick the fucking shit out of you…..
    Winston Churchill, 1939
    Save your Forum..._
    _...KILL A MODERATOR!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •