Solved

ASP script to add email field to outlook mail group

Posted on 2004-08-12
7
287 Views
Last Modified: 2008-03-06
Is there a way for an email entered into a text box to get added to a group assigned in Microsoft outlook program? A user of a asp web app I wrote wants the email to get added automatically when they create a new record so she can send email to everyone in the database.
0
Comment
Question by:cseink
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 3

Expert Comment

by:dwaldner
ID: 11785846
There probably is, but the easiest way is to export a VCard for import into Outlook.

I've done this before, I can provide code if you'd like...
0
 

Author Comment

by:cseink
ID: 11786787
Yes that would be great. Thanks
0
 
LVL 3

Accepted Solution

by:
dwaldner earned 500 total points
ID: 11786903
Steps to implement:

1.  Change the listed query...it only works for my code...but you need to provide a query that provides similar information (ie. first name, last name, address, etc.)

2.  Create a blank file called vcard.vcf and point the FILEPATH to point to it...

Hope you can make sense of it all

Dan

---------------------------------------------------------

<!--#include virtual="/connections/connection.asp"-->
<%
  set rs = server.createObject("ADODB.RecordSet")
  rs.Open "SELECT * FROM [Committee Members Query] WHERE [committee member id] = '" & request("committee_member_id") & "'",my_Conn,3,3
  if not rs.eof then
    FILEPATH = "F:\websites\common\data_export\vcard.vcf"              
    Set fs = Server.CreateObject("Scripting.FileSystemObject")
    Set file = fs.GetFile(FILEPATH)
    file.Delete True
    set file = nothing
    Set writefile = fs.OpenTextFile(FILEPATH, 8, True)            
    writefile.writeline("BEGIN:VCARD")
    writefile.writeline("N:"& rs("last name") & ";" & rs("first name"))    
    writefile.writeline("FN:"& rs("first name") & " " & rs("last name"))
    writefile.writeline("CATEGORIES:" & rs("committee name"))
    writefile.writeline("NOTE;ENCODING=QUOTED-PRINTABLE:" & rs("position") & "=0D=0A")
    ADR = ""
    if rs("organization address 1") <> "" then
      if rs("organization address 1") <> "" then
        ADR = ADR & ";" & rs("organization address 1")
      end if
      if rs("organization address 2") <> "" then
        ADR = ADR & ";" & rs("organization address 2")
      end if
      if rs("organization city") <> "" then
        ADR = ADR & ";" & rs("organization city")
      end if
      if rs("organization province") <> "" then
        ADR = ADR & ";" & rs("organization province")
      end if
      if rs("organization postal code") <> "" then
        ADR = ADR & ";" & rs("organization postal code")
      end if
    end if
    if ADR <> "" then
      writefile.writeline("ADR:" & ADR)
    end if
    if rs("organization phone") <> "" then
      writefile.writeline("TEL;WORK:" & rs("organization phone"))
    end if
    if rs("home phone") <> "" then
    writefile.writeline("TEL;HOME:" & rs("home phone"))
    end if
    if rs("organization email") <> "" then
    writefile.writeline("EMAIL;INTERNET:" & rs("organization email"))
    end if
    if rs("title") <> "" then
    writefile.writeline("TITLE:" & rs("title"))
    end if
    if rs("organization name") <> "" then
    writefile.writeline("ORG:" & rs("organization name"))
    end if
    writefile.writeline("END:VCARD")
  end if
  rs.Close
  set rs = Nothing
  response.redirect("/common/data_export/vcard.vcf")
 %>
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 11

Expert Comment

by:sciber_dude
ID: 11787362
dwaldner's solution works! He has given you the answer.

But if you want a tutorial, here is a good read http://www.devx.com/getHelpOn/10MinuteSolution/20508

(read all 4 pages and this solution is a little different from dwaldner's but basically the same thing)

:) SD
0
 
LVL 11

Expert Comment

by:sciber_dude
ID: 11787373
oops! my solution was for a vCalendar! never mind!

U can say that its been a long day for me! Phew!
:) SD
0
 

Expert Comment

by:Minessence
ID: 12924114
Do you have a similar solution for .net?
0
 
LVL 11

Expert Comment

by:sciber_dude
ID: 12925861
sorry, i am not a .Net guy. so i dont.

:) SD
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question