Generate iCal or vCal files from Access

C

Clint Marshall

Has anyone ever used Access to generate iCal or vCal files?
I'm trying to create calendar data in Access and then generate an export
file in either iCal or vCal format that I can upload to a WebCalendar.
Any help appreciated.
 
T

Tony Toews [MVP]

Clint Marshall said:
Has anyone ever used Access to generate iCal or vCal files?
I'm trying to create calendar data in Access and then generate an export
file in either iCal or vCal format that I can upload to a WebCalendar.

Those are just text files which you can rename the extension to .txt
and open them in Notepad. You can use the Write # statement to
create those files. Go into VBA, hit F1 for help and search on Write
#.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
C

Clint Marshall

I'm sorry, Tony, I didn't describe this well.
I just opened VBA from Access and couldn't find anything useful when I
searched for "write #".

I am entering calendar data into an Access table (could also be Excel).
What I need is a way to create an ical or vcal file (text file with specific
formatting and information) from this data. I'm using Access or Excel to
collect the data because there's a lot of repetition and it's a pain to
create in Outlook.
I need to somehow take all the events and create a text file in the ical or
vcal format. I will then import this file (and its events) into my internet
WebCalendar.

Thanks for your thoughts!
 
T

Tony Toews [MVP]

Clint Marshall said:
I'm sorry, Tony, I didn't describe this well.

No, you described it quite well.
I just opened VBA from Access and couldn't find anything useful when I
searched for "write #".

from A2003 help.

Write # Statement


Writes data to a sequential file.

Syntax

Write #filenumber, [outputlist]

The Write # statement syntax has these parts:

Part Description
filenumber Required. Any valid file number.
outputlist Optional. One or more comma-delimited numeric expressions
or string expressions to write to a file.



Remarks

Data written with Write # is usually read from a file with Input #.

If you omit outputlist and include a comma after filenumber, a blank
line is printed to the file. Multiple expressions can be separated
with a space, a semicolon, or a comma. A space has the same effect as
a semicolon.

When Write # is used to write data to a file, several universal
assumptions are followed so the data can always be read and correctly
interpreted using Input #, regardless of locale:

Numeric data is always written using the period as the decimal
separator.


For Boolean data, either #TRUE# or #FALSE# is printed. The True and
False keywords are not translated, regardless of locale.


Date data is written to the file using the universal date format. When
either the date or the time component is missing or zero, only the
part provided gets written to the file.


Nothing is written to the file if outputlist data is Empty. However,
for Null data, #NULL# is written.


If outputlist data is Null data, #NULL# is written to the file.


For Error data, the output appears as #ERROR errorcode#. The Error
keyword is not translated, regardless of locale.
Unlike the Print # statement, the Write # statement inserts commas
between items and quotation marks around strings as they are written
to the file. You don't have to put explicit delimiters in the list.
Write # inserts a newline character, that is, a carriage
return–linefeed (Chr(13) + Chr(10)), after it has written the final
character in outputlist to the file.

Note You should not write strings that contain embedded quotation
marks, for example, "1,2""X" for use with the Input # statement: Input
# parses this string as two complete and separate strings."
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
L

Larry Linson

Clint Marshall said:
I just opened VBA from Access and couldn't
find anything useful when I searched for "write #".

Look for Print # both with and without the space. Other pertinent VBA
statements would be Open and Close.

Larry Linson
Microsoft Office Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top