-
Feb 21st, 2018, 02:46 PM
#1
Thread Starter
New Member
Using VB script to code placement of signature name using the <table> syntax
Hi all,
I am trying to figure out how to place the name that would go on a signature template to the right of a logo of a company, my previous signature file allowed me to use the "objFileWrite" command after a line return because it the statements were written in order using the line return command...such as the example below:
Full Name
Title
Phone #
Logo
Now the html code that I have been given still needs to grab the AD information but from a different prospective such as this small example:
Company logo Name
Title
eg....
Its not as simple as pasting the html syntax into the vbs file is it?
Thank-you
John
Last edited by JohnProphet; Feb 22nd, 2018 at 08:33 AM.
Reason: Further definition of objective
-
Feb 22nd, 2018, 08:36 AM
#2
Thread Starter
New Member
Re: Using VB script to code placement of signature name using the <table> syntax
Here is what the original vbscript looks like now as an example going from top to bottom.
objFile.Write "<html><head><title></title></head><body>" & vbCrLf
objFile.Write "<span style='font-size:10pt; color:#17385F; font-family:Arial, Helvetica, sans-serif; font-weight:bold;'>" & strFullName & "</span><br />"& vbCrLf
objFile.Write "<span style='font-size:9pt; color:#808080; font-family:Arial, Helvetica, sans-serif;'>" & vbCrLf
objFile.Write strTitle & "<br>" & vbCrLf
objFile.Write "<span style='font-size:9pt; font-family:Arial, Helvetica, sans-serif;'> </span><br>" & vbCrLf
So my objective is to ojjFile.Write the strFullName to the top right of the logo which will reside on the top left.
I hope that helps out for further definition.
Thank-you
John
-
Feb 22nd, 2018, 08:42 AM
#3
Re: Using VB script to code placement of signature name using the <table> syntax
it looks like all you need to do is write out an img tag before the span tag with the name. Yes, it's that simple... just don't include a </br> tag.
-tg
-
Feb 22nd, 2018, 12:13 PM
#4
Thread Starter
New Member
Re: Using VB script to code placement of signature name using the <table> syntax
Thank you for the quick response but if I may show you what I have already maybe I can understand it more clearly.
'*********DIRECT # HTML TEMPLATE*********'
Err.Clear
Set objFile = objFSO.CreateTextFile(strHTMFile, boolUpdateStyle, False)
If Err.Number = 0 Then
objFile.Write "<html><head><title></title></head><body>" & vbCrLf
if ((LEN(strCompany) > 0) AND (instr(strCompany, "LES") > 0)) OR ((LEN(strCompany) > 0) AND (instr(strCompany, "COMP1") > 0)) then
strLogo = strCOMP1logo
end if
if ((LEN(strCompany) > 0) AND (instr(strCompany, "COMP2") > 0)) then
strLogo = strCOMP1logo & strCOMP4logo
end if
if ((LEN(strCompany) > 0) AND (instr(strCompany, "COMP3") > 0)) OR ((LEN(strCompany) > 0) AND (instr(strCompany, "COMP4") > 0)) then
strLogo = strCOMP4logo
end if
objFile.Write strLogo & "<br>"
objFile.Write "<span style='font-size:10pt; color:#17385F; font-family:Arial, Helvetica, sans-serif; font-weight:bold;'>" & strFullName & "</span><br />"& vbCrLf
So from above my logos are are the first thing written to the output "htm" file. My confusion is how to place the description of the employee to the right of the image using the objFile.Write.
Thankyou for your patience...I'm almost there.
John
-
Feb 22nd, 2018, 01:22 PM
#5
Re: Using VB script to code placement of signature name using the <table> syntax
What did I say?
Originally Posted by techgnome
just don't include a </br> tag.
Which you did:
Code:
objFile.Write strLogo & "<br>"
-tg
-
Feb 22nd, 2018, 03:42 PM
#6
Thread Starter
New Member
Re: Using VB script to code placement of signature name using the <table> syntax
But the code puts the first name and last name at the bottom and not the top?
My confusion is the syntax order placing the text at the top left corner to the right of the logo for the signature.
I need it to look something like this as far as the text is concerned.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|