+ Reply to Thread
Results 1 to 7 of 7

Thread: vb code for default user signature

  1. #1
    Registered User
    Join Date
    01-27-2012
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    38

    vb code for default user signature

    Hi

    I have a macro in excel that, creates an email in outlook. The issue I have is, this spreadsheet can be used by multiple people and I want their corresponding email signature in the email when they send it

    The signature code I have is :

    [SigString = "C:\Documents and Settings\" & Environ("username") & _
    "\Application Data\Microsoft\Signatures\]

    after the signatures path i need to do a wildcard that will pick up the users signature. I know the file I want ends in .htm

    can someone show me how i can use wildcard characters to pick up any users email signature.

    It sounds easy, but I cant get my head round it!

    Thank You
    Last edited by cooket4; 02-03-2012 at 09:53 AM.

  2. #2
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,640

    Re: vb code for default user signature

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

  3. #3
    Valued Forum Contributor Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds/Sheffield, England
    MS-Off Ver
    Excel 2003
    Posts
    1,031

    Re: vb code for default user signature

    Hi

    What if they have more than one htm signature?
    Click the * below to say thanks

    Girls sleep with guys who use photoshop, but marry the ones who work with Excel

    Corduroy
    pillows: They're making headlines!

    Did you mean: recursion
    http://www.google.com/search?hl=en&q=recursion

  4. #4
    Registered User
    Join Date
    01-27-2012
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: vb code for default user signature

    Hi

    There will only be 1 .htm file, ist our company policy to only have 1

  5. #5
    Valued Forum Contributor Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds/Sheffield, England
    MS-Off Ver
    Excel 2003
    Posts
    1,031

    Re: vb code for default user signature

    Please put your code in tags and I'll post the solution
    Click the * below to say thanks

    Girls sleep with guys who use photoshop, but marry the ones who work with Excel

    Corduroy
    pillows: They're making headlines!

    Did you mean: recursion
    http://www.google.com/search?hl=en&q=recursion

  6. #6
    Registered User
    Join Date
    01-27-2012
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: vb code for default user signature

    I have added tags havent I? This is my first post, and I couldnt find the # Roy was talking about - never mind found the #!
    Last edited by cooket4; 01-27-2012 at 09:04 AM.

  7. #7
    Registered User
    Join Date
    01-27-2012
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: vb code for default user signature

    Hi

    I have a macro in excel that, creates an email in outlook. The issue I have is, this spreadsheet can be used by multiple people and I want their corresponding email signature in the email when they send it

    The signature code I have is :

    SigString = "C:\Documents and Settings\" & Environ("username") & _
    "\Application Data\Microsoft\Signatures\
    after the signatures path i need to do a wildcard that will pick up the users signature. I know the file I want ends in .htm

    can someone show me how i can use wildcard characters to pick up any users email signature.

    It sounds easy, but I cant get my head round it!

    Thank You

  8. #8
    Valued Forum Contributor Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds/Sheffield, England
    MS-Off Ver
    Excel 2003
    Posts
    1,031

    Re: vb code for default user signature

    Ok you need:

    SigString = "C:\Documents and Settings\" & Environ("username") & _
    "\Application Data\Microsoft\Signatures\"
    Sigstring = Sigstring & Dir(sigstring & "*.htm")
    Click the * below to say thanks

    Girls sleep with guys who use photoshop, but marry the ones who work with Excel

    Corduroy
    pillows: They're making headlines!

    Did you mean: recursion
    http://www.google.com/search?hl=en&q=recursion

  9. #9
    Registered User
    Join Date
    01-27-2012
    Location
    Durham
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: vb code for default user signature

    I was so close! Thanks It worked a treat

    I got a toughie (well I think it is) next. Ill start a new thread.

    Thank You

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0