T
Tom Petersen
Here is a little more info, sorry should have explained what my final goal
was. I am creating a .vcs file from a form to import into Outlook. I was
just testing the output on screen then pasting that into a file, after
removing the extra white space, and inserting line breaks. The data is
valid, but the formatting into the file isn't working. Was I doing the
formatting right if I was generating a file? I need it to create the .vcs
without any white spaces and a 'return' after each line to match the output
at the very bottom. Here is the code again, and the bit to generate the
file:
strvCalendar = "BEGIN:VCALENDAR" & vbCrLf & _
"VERSION:1.0" & vbCrLf & _
"BEGIN:VEVENT" & vbCrLf & _
"DTSTART:" & strStart & vbCrLf & _
"DTEND:" & strStart & vbCrLf & _
"LOCATION;ENCODING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
"UID:" & strStart & strSubject & vbCrLf & _
"DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _
"SUMMARY;ENCODING=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
"PRIORITY:3" & vbCrLf & _
"END:VEVENT" & vbCrLf & _
"END:VCALENDAR" & vbCrLf
Response.ContentType = "text/x-vCalendar"
Response.AddHeader "Content-Disposition", _
"filename=Event" & "cal.vcs"
Response.Write strvCalendar
Response.End
This gernerates an error message in Outlook stating it can't import the
calendar file. But, again, if I paste the data into a text file with a .vcs
extension, and delete white space and insert line breaks I can double click
the file and it imports into Outlook fine, this is why I think I just don't
know how to format the 'output' correctly.
I appreciate the help!!!
Final .vcs contents:
BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VEVENT
DTSTART:20060208T180000Z
DTEND:20060208T190000Z
LOCATION;ENCODING=QUOTED-PRINTABLE:Library
UID:20051022T220000ZI-request
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODING=QUOTED-PRINTABLE:I-request
PRIORITY:3
END:VEVENT
END:VCALENDAR
was. I am creating a .vcs file from a form to import into Outlook. I was
just testing the output on screen then pasting that into a file, after
removing the extra white space, and inserting line breaks. The data is
valid, but the formatting into the file isn't working. Was I doing the
formatting right if I was generating a file? I need it to create the .vcs
without any white spaces and a 'return' after each line to match the output
at the very bottom. Here is the code again, and the bit to generate the
file:
strvCalendar = "BEGIN:VCALENDAR" & vbCrLf & _
"VERSION:1.0" & vbCrLf & _
"BEGIN:VEVENT" & vbCrLf & _
"DTSTART:" & strStart & vbCrLf & _
"DTEND:" & strStart & vbCrLf & _
"LOCATION;ENCODING=QUOTED-PRINTABLE:" & strLocation & vbCrLf & _
"UID:" & strStart & strSubject & vbCrLf & _
"DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" & strDescription & vbCrLf & _
"SUMMARY;ENCODING=QUOTED-PRINTABLE:" & strSubject & vbCrLf & _
"PRIORITY:3" & vbCrLf & _
"END:VEVENT" & vbCrLf & _
"END:VCALENDAR" & vbCrLf
Response.ContentType = "text/x-vCalendar"
Response.AddHeader "Content-Disposition", _
"filename=Event" & "cal.vcs"
Response.Write strvCalendar
Response.End
This gernerates an error message in Outlook stating it can't import the
calendar file. But, again, if I paste the data into a text file with a .vcs
extension, and delete white space and insert line breaks I can double click
the file and it imports into Outlook fine, this is why I think I just don't
know how to format the 'output' correctly.
I appreciate the help!!!
Final .vcs contents:
BEGIN:VCALENDAR
VERSION:1.0
BEGIN:VEVENT
DTSTART:20060208T180000Z
DTEND:20060208T190000Z
LOCATION;ENCODING=QUOTED-PRINTABLE:Library
UID:20051022T220000ZI-request
DESCRIPTION;ENCODING=QUOTED-PRINTABLE:test
SUMMARY;ENCODING=QUOTED-PRINTABLE:I-request
PRIORITY:3
END:VEVENT
END:VCALENDAR