Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

ASP script to add email field to outlook mail group

Posted on 2004-08-12
7
Medium Priority
?
289 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 2000 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
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/…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 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