VBA code-Signature code failure

khaledocom

New Member
Joined
Jan 1, 2010
Messages
29
The bellow code shows Excel VBA code to make signature for outlook 2007 outgoing messages.
It works properly but doesn't show the picture in signature (Pic is not appearing). Can you help with this regarding.


<table width="560" border="0" cellpadding="0" cellspacing="0"><col style="width: 42pt;" width="56" span="10"> <tbody><tr style="height: 15.75pt;" height="21"> <td colspan="10" class="xl22" style="height: 15.75pt; width: 420pt;" width="560" height="21">The pic (photo) in my signature doesn't appear when I use signature code</td> </tr> <tr style="height: 15.75pt;" height="21"> <td colspan="10" class="xl22" style="height: 15.75pt;" height="21">It show only red X on top.
</td> </tr> </tbody></table>
Code:

Function GetBoiler(ByVal sFile As String) As String

Dim fso As Object
Dim ts As Object
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.GetFile(sFile).OpenAsTextStream(1, -2)
GetBoiler = ts.readall
ts.Close
End Function




Sub Mail_Outlook_With_Signature_Plain()

Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim SigString As String
Dim Signature As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

strbody = "Go for test mode of Qtel billing and recovery"





SigString = "C:\Documents and Settings\" & Environ("username") & _
"\Application Data\Microsoft\Signatures\Khaledo.htm"


If Dir(SigString) <> "" Then
Signature = GetBoiler(SigString)
Else
Signature = ""
End If

On Error Resume Next
With OutMail
.To = "khaledocom@yahoo.com"
.CC = ""
.BCC = ""
.Subject = "Test Mode"
.HTMLBody = strbody & "<br><br>" & Signature

.Send
End With

On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub


I'm very thankful for your help and support.
 
I just opened the htm file using notepad, then select all, copy and pated here.

That's all. How some of it appears with different color? I don't know.

Thanks for your help.
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Did you insert a space after every < character as I suggested?
 
Upvote 0
After I did so, the page is not being displayed as a web page when I open it in browser.
It just shows the text below:


< html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40" > < head > < meta http-equiv=Content-Type content="text/html; charset=windows-1256" > < meta name=ProgId content=Word.Document > < meta name=Generator content="Microsoft Word 12" > < meta name=Originator content="Microsoft Word 12" > < link rel=File-List href="PDC_files/filelist.xml" > < link rel=Edit-Time-Data href="PDC_files/editdata.mso" > < !--[if !mso] > < style > v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} < /style > < ![endif]-- > < link rel=themeData href="PDC_files/themedata.thmx" > < link rel=colorSchemeMapping href="PDC_files/colorschememapping.xml" > < !--[if gte mso 9] >< xml > < w:WordDocument > < w:View >Normal< /w:View > < w:Zoom >0< /w:Zoom > < w:TrackMoves/ > < w:TrackFormatting/ > < w:PunctuationKerning/ > < w:ValidateAgainstSchemas/ > < w:SaveIfXMLInvalid >false< /w:SaveIfXMLInvalid > < w:IgnoreMixedContent >false< /w:IgnoreMixedContent > < w:AlwaysShowPlaceholderText >false< /w:AlwaysShowPlaceholderText > < w:DoNotPromoteQF/ > < w:LidThemeOther >EN-US< /w:LidThemeOther > < w:LidThemeAsian >X-NONE< /w:LidThemeAsian > < w:LidThemeComplexScript >AR-SA< /w:LidThemeComplexScript > < w:DoNotShadeFormData/ > < w:Compatibility > < w:BreakWrappedTables/ > < w:SnapToGridInCell/ > < w:WrapTextWithPunct/ > < w:UseAsianBreakRules/ > < w:DontGrowAutofit/ > < w:SplitPgBreakAndParaMark/ > < w:DontVertAlignCellWithSp/ > < w:DontBreakConstrainedForcedTables/ > < w:DontVertAlignInTxbx/ > < w:Word11KerningPairs/ > < w:CachedColBalance/ > < w:UseFELayout/ > < /w:Compatibility > < w:BrowserLevel >MicrosoftInternetExplorer4< /w:BrowserLevel > < m:mathPr > < m:mathFont m:val="Cambria Math"/ > < m:brkBin m:val="before"/ > < m:brkBinSub m:val="--"/ > < m:smallFrac m:val="off"/ > < m:dispDef/ > < m:lMargin m:val="0"/ > < m:rMargin m:val="0"/ > < m:defJc m:val="centerGroup"/ > < m:wrapIndent m:val="1440"/ > < m:intLim m:val="subSup"/ > < m:naryLim m:val="undOvr"/ > < /m:mathPr >< /w:WordDocument > < /xml >< ![endif]-- >< !--[if gte mso 9] >< xml > < w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true" DefSemiHidden="true" DefQFormat="false" DefPriority="99" LatentStyleCount="267" > < w:LsdException Locked="false" Priority="0" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Normal"/ > < w:LsdException Locked="false" Priority="9" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="heading 1"/ > < w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/ > < w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/ > < w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/ > < w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/ > < w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/ > < w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/ > < w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/ > < w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/ > < w:LsdException Locked="false" Priority="39" Name="toc 1"/ > < w:LsdException Locked="false" Priority="39" Name="toc 2"/ > < w:LsdException Locked="false" Priority="39" Name="toc 3"/ > < w:LsdException Locked="false" Priority="39" Name="toc 4"/ > < w:LsdException Locked="false" Priority="39" Name="toc 5"/ > < w:LsdException Locked="false" Priority="39" Name="toc 6"/ > < w:LsdException Locked="false" Priority="39" Name="toc 7"/ > < w:LsdException Locked="false" Priority="39" Name="toc 8"/ > < w:LsdException Locked="false" Priority="39" Name="toc 9"/ > < w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/ > < w:LsdException Locked="false" Priority="10" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Title"/ > < w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/ > < w:LsdException Locked="false" Priority="11" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/ > < w:LsdException Locked="false" Priority="22" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Strong"/ > < w:LsdException Locked="false" Priority="20" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/ > < w:LsdException Locked="false" Priority="59" SemiHidden="false" UnhideWhenUsed="false" Name="Table Grid"/ > < w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/ > < w:LsdException Locked="false" Priority="1" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/ > < w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading"/ > < w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List"/ > < w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid"/ > < w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1"/ > < w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2"/ > < w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1"/ > < w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2"/ > < w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1"/ > < w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2"/ > < w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3"/ > < w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List"/ > < w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading"/ > < w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List"/ > < w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid"/ > < w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 1"/ > < w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 1"/ > < w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 1"/ > < w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/ > < w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/ > < w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/ > < w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/ > < w:LsdException Locked="false" Priority="34" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/ > < w:LsdException Locked="false" Priority="29" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Quote"/ > < w:LsdException Locked="false" Priority="30" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/ > < w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/ > < w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/ > < w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/ > < w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/ > < w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 1"/ > < w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/ > < w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 1"/ > < w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/ > < w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 2"/ > < w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 2"/ > < w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 2"/ > < w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/ > < w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/ > < w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/ > < w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/ > < w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/ > < w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/ > < w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/ > < w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 2"/ > < w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/ > < w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 2"/ > < w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/ > < w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 3"/ > < w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 3"/ > < w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 3"/ > < w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/ > < w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/ > < w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/ > < w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/ > < w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/ > < w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/ > < w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/ > < w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 3"/ > < w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/ > < w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 3"/ > < w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/ > < w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 4"/ > < w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 4"/ > < w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 4"/ > < w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/ > < w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/ > < w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/ > < w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/ > < w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/ > < w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/ > < w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/ > < w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 4"/ > < w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/ > < w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 4"/ > < w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/ > < w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 5"/ > < w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 5"/ > < w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 5"/ > < w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/ > < w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/ > < w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/ > < w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/ > < w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/ > < w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/ > < w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/ > < w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 5"/ > < w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/ > < w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 5"/ > < w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/ > < w:LsdException Locked="false" Priority="60" SemiHidden="false" UnhideWhenUsed="false" Name="Light Shading Accent 6"/ > < w:LsdException Locked="false" Priority="61" SemiHidden="false" UnhideWhenUsed="false" Name="Light List Accent 6"/ > < w:LsdException Locked="false" Priority="62" SemiHidden="false" UnhideWhenUsed="false" Name="Light Grid Accent 6"/ > < w:LsdException Locked="false" Priority="63" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/ > < w:LsdException Locked="false" Priority="64" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/ > < w:LsdException Locked="false" Priority="65" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/ > < w:LsdException Locked="false" Priority="66" SemiHidden="false" UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/ > < w:LsdException Locked="false" Priority="67" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/ > < w:LsdException Locked="false" Priority="68" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/ > < w:LsdException Locked="false" Priority="69" SemiHidden="false" UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/ > < w:LsdException Locked="false" Priority="70" SemiHidden="false" UnhideWhenUsed="false" Name="Dark List Accent 6"/ > < w:LsdException Locked="false" Priority="71" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/ > < w:LsdException Locked="false" Priority="72" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful List Accent 6"/ > < w:LsdException Locked="false" Priority="73" SemiHidden="false" UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/ > < w:LsdException Locked="false" Priority="19" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/ > < w:LsdException Locked="false" Priority="21" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/ > < w:LsdException Locked="false" Priority="31" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/ > < w:LsdException Locked="false" Priority="32" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/ > < w:LsdException Locked="false" Priority="33" SemiHidden="false" UnhideWhenUsed="false" QFormat="true" Name="Book Title"/ > < w:LsdException Locked="false" Priority="37" Name="Bibliography"/ > < w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/ > < /w:LatentStyles > < /xml >< ![endif]-- > < style > < !-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4; mso-font-charset:1; mso-generic-font-family:roman; mso-font-format:other; mso-font-pitch:variable; mso-font-signature:0 0 0 0 0 0;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4; mso-font-charset:0; mso-generic-font-family:swiss; mso-font-pitch:variable; mso-font-signature:-1610611985 1073750139 0 0 159 0;} @font-face {font-family:Webdings; panose-1:5 3 1 2 1 5 9 6 7 3; mso-font-charset:2; mso-generic-font-family:roman; mso-font-pitch:variable; mso-font-signature:0 268435456 0 0 -2147483648 0;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {mso-style-unhide:no; mso-style-qformat:yes; mso-style-parent:""; margin:0in; margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial; mso-bidi-theme-font:minor-bidi;} a:link, span.MsoHyperlink {mso-style-noshow:yes; mso-style-priority:99; color:blue; text-decoration:underline; text-underline:single;} a:visited, span.MsoHyperlinkFollowed {mso-style-noshow:yes; mso-style-priority:99; color:purple; mso-themecolor:followedhyperlink; text-decoration:underline; text-underline:single;} .MsoChpDefault {mso-style-type:export-only; mso-default-props:yes; font-size:11.0pt; mso-ansi-font-size:11.0pt; mso-bidi-font-size:11.0pt; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-fareast-font-family:"Times New Roman"; mso-fareast-theme-font:minor-fareast; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin; mso-bidi-font-family:Arial; mso-bidi-theme-font:minor-bidi;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in; mso-header-margin:.5in; mso-footer-margin:.5in; mso-paper-source:0;} div.Section1 {page:Section1;} -- > < /style > < !--[if gte mso 10] > < style > /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:11.0pt; font-family:"Calibri","sans-serif"; mso-ascii-font-family:Calibri; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Calibri; mso-hansi-theme-font:minor-latin;} < /style > < ![endif]-- > < /head > < body lang=EN-US link=blue vlink=purple style='tab-interval:.5in' > < div class=Section1 > < p class=MsoNormal >< span style='color:#1F497D' >Best Regards< /span >< span style='font-size:12.0pt;font-family:"Times New Roman","serif";mso-bidi-font-family: Arial;mso-bidi-theme-font:minor-bidi;color:#1F497D' >< o:p >< /o:p >< /span >< /p > < p class=MsoNormal >< b >< i >< span style='color:#548DD4' >< o:p > < /o:p >< /span >< /i >< /b >< /p > < p class=MsoNormal >< b >< i >< span style='color:#548DD4' >Khaledo< o:p >< /o:p >< /span >< /i >< /b >< /p > < p class=MsoNormal >< b >< i >< span style='font-size:10.0pt;color:#548DD4' >Finance Department< o:p >< /o:p >< /span >< /i >< /b >< /p > < p class=MsoNormal >< b >< i >< span style='font-size:10.0pt;color:#548DD4' >Tel +20 33051216 < o:p >< /o:p >< /span >< /i >< /b >< /p > < p class=MsoNormal >< b >< i >< span style='font-size:10.0pt;color:#548DD4' >< o:p > < /o:p >< /span >< /i >< /b >< /p > < p class=MsoNormal style='text-autospace:none' >< span style='font-size:8.0pt; font-family:"Arial","sans-serif";color:#595959' >OPDC Sphinx Trading Co< o:p >< /o:p >< /span >< /p > < p class=MsoNormal style='text-autospace:none' >< span style='font-size:8.0pt; font-family:"Arial","sans-serif";color:#595959' >136 DC ring - Cairo, Egypt< o:p >< /o:p >< /span >< /p > < p class=MsoNormal style='text-autospace:none' >< span style='font-size:8.0pt; font-family:"Arial","sans-serif";color:#595959' >< !--[if gte vml 1] >< v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f" > < v:stroke joinstyle="miter"/ > < v:formulas > < v:f eqn="if lineDrawn pixelLineWidth 0"/ > < v:f eqn="sum @0 1 0"/ > < v:f eqn="sum 0 0 @1"/ > < v:f eqn="prod @2 1 2"/ > < v:f eqn="prod @3 21600 pixelWidth"/ > < v:f eqn="prod @3 21600 pixelHeight"/ > < v:f eqn="sum @0 0 1"/ > < v:f eqn="prod @6 1 2"/ > < v:f eqn="prod @7 21600 pixelWidth"/ > < v:f eqn="sum @8 21600 0"/ > < v:f eqn="prod @7 21600 pixelHeight"/ > < v:f eqn="sum @10 21600 0"/ > < /v:formulas > < v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/ > < o:lock v:ext="edit" aspectratio="t"/ > < /v:shapetype >< v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:207.75pt; height:136.5pt' > < v:imagedata src="PDC_files/image001.png" o:title=""/ > < /v:shape >< ![endif]-- >< ![if !vml] >< img width=277 height=182 src="PDC_files/image002.jpg" v:shapes="_x0000_i1025" >< ![endif] >< o:p >< /o:p >< /span >< /p > < p class=MsoNormal >< span style='font-size:8.0pt;font-family:"Arial","sans-serif"; color:#595959' >< o:p > < /o:p >< /span >< /p > < p class=MsoNormal >< b >< span lang=EN-GB style='font-size:13.5pt;font-family: Webdings;color:#4FAD26;mso-ansi-language:EN-GB' >ü< /span >< /b >< span lang=EN-GB style='mso-ascii-font-family:Calibri;mso-hansi-font-family:Calibri;color:green; mso-ansi-language:EN-GB' > Please don't print this e-mail unless you really need to< /span >< /p > < p class=MsoNormal >< o:p > < /o:p >< /p > < /div > < /body > < /html >
 
Upvote 0
After I did so, the page is not being displayed as a web page when I open it in browser.
It just shows the text below:
Yes, that's exactly what I need to see - the contents of the file.

I'll look at it later today and see if I can spot the problem.
 
Upvote 0
Well it works perfectly on my system, although that's a lot of HTML to produce a couple of lines of text and a link to an image file. I created a new email, viewed it okay, then sent it and the recipient

The only thing I can think of is to include the full path to the image files.

Look for these two lines:-
Code:
src="[COLOR=red][B]PDC_files/[/B][/COLOR]image001.png"
src="[COLOR=red][B]PDC_files/[/B][/COLOR]image002.jpg"
and change them to the full path including the drive, for example:-
Code:
src="[COLOR=red][B]c:\folder\PDC_files\[/B][/COLOR]image001.png"
src="[COLOR=red][B]c:\folder\PDC_files\[/B][/COLOR]image002.jpg"

(Obviously you'd put your own path in place of the bits in red.)

Please let me know if that works?
 
Upvote 0
Here's a much simpler HTM file for you to try. I've cut out all the unnecessary stuff (which I think Word produced - yes?), although you may need to adjust the fonts, sizes and spacing slightly. You'll need to remove all the spaces after the < characters and put your filename in where I've written c:\folder\PDC_files\image002.jpg.
HTML:
< html>
  < head>
 
    < style>
      table.MsoNormalTable
        {
          mso-style-name:"Table Normal";
          mso-tstyle-rowband-size:0;
          mso-tstyle-colband-size:0;
          mso-style-noshow:yes;
          mso-style-priority:99;
          mso-style-qformat:yes;
          mso-style-parent:"";
          mso-padding-alt:0in 5.4pt 0in 5.4pt;
          mso-para-margin:0in;
          mso-para-margin-bottom:.0001pt;
          mso-pagination:widow-orphan;
          font-size:11.0pt;
          font-family:"Calibri","sans-serif";
          mso-ascii-font-family:Calibri;
          mso-ascii-theme-font:minor-latin;
          mso-hansi-font-family:Calibri;
          mso-hansi-theme-font:minor-latin;
        }
    < /style>
 
  < /head>
 
  < body lang=EN-US link=blue vlink=purple style='tab-interval:.5in'>
 
    < div>
 
      < p class=MsoNormal>
      < span style='font-size:10.0pt; font-family:"Arial","sans-serif"; color:#1F497D'>
      Best Regards
      < /span>
      < /p>
 
      < p class=MsoNormal>
      < b>< i>
      < span style='font-size:10.0pt; font-family:"Arial","sans-serif"; color:#548DD4'>
      Khaledo< br>
      Finance Department< br>
      Tel +20 33051216
      < /span>
      < /i>< /b>
      < /p>
 
      < p class=MsoNormal style='text-autospace:none'>
      < span style='font-size:8.0pt; font-family:"Arial","sans-serif"; color:#595959'>
      OPDC Sphinx Trading Co< br>
      136 DC ring - Cairo, Egypt
      < /span>
      < /p>
 
      < p class=MsoNormal style='text-autospace:none'>
      < span style='font-size:8.0pt; font-family:"Arial","sans-serif"; color:#595959'>
      < img src="c:\folder\PDC_files\image002.jpg" width=277 height=182>
      < /span>
      < /p>
 
      < p class=MsoNormal>< b>
      < span lang=EN-GB style='font-size:13.5pt; font-family: Webdings; color:#4FAD26;
       mso-ansi-language:EN-GB'>ü< /span>
      < /b>
      < span lang=EN-GB style='font-size:10.0pt; font-family:"Arial","sans-serif"; color:green;
       mso-ansi-language:EN-GB'> Please don't print this e-mail unless you really need to< /span>
      < /p>
 
    < /div>
 
  < /body>
 
< /html>
 
Upvote 0
Dear Ruddles,

Thanks a lot my brother, now only it's working properly.

Again many thanks for your help with this regarding.
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,252
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top