dcsimg
Results 1 to 6 of 6

Thread: Using VB script to code placement of signature name using the <table> syntax

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    4

    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

  2. #2

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    4

    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;'>&nbsp;</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

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    31,778

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    4

    Smile 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

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    31,778

    Re: Using VB script to code placement of signature name using the <table> syntax

    What did I say?
    Quote Originally Posted by techgnome View Post
    just don't include a </br> tag.
    Which you did:
    Code:
    objFile.Write strLogo & "<br>"
    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    New Member
    Join Date
    Feb 2018
    Posts
    4

    Smile 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.

    Name:  sample.png
Views: 64
Size:  14.5 KB

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width