Problem exporting custom text multi-line field from Outlook to Access

G

greg

Hi

I would appreciate some help with the following:

I have a customised Outlook 2003 contact form that contains some multi
line text boxes.

When I export these fields to an access table using VBscript, I only
get the first line of text in the Access Table, subsequent lines of
text are excluded.

eg the data in outlook may say -
"This is a bit of Text on the first line
This is a bit of text on the second line"

Exporting the above results in only the following text in the access
table -
"This is a bit of Text on the first line"

any lines after the first are ommitted.


How can I export all the text into the Access Table?


Outlook source Field Details:
On Form Textbox checked as "Multi-Line"
Bound to a Field type "text"

Access Destination Field Details
Field in table - "Memo" data type

VBscript:
Sub ExportToIrisData()

Dim strDBName
Dim dao
Dim dbs
Dim rst

strDBName = "C:\McK_WG-Docs\ActiveDocData\IrisExp.mdb"
= " &Item.CustomerID
Set dao = CreateObject("DAO.DBEngine.36")
Set dao = DAO.Workspaces(0)
Set dbs = dao_OpenDatabase(strDBName)
Set rst = dbs.OpenRecordset("FixedFeeData")

item.save
rst.delete
rst.AddNew

If Item.CustomerID <> "" Then rst.CustomerID = Item.CustomerID
If Item.UserProperties("Fixed Fee")<> "" Then rst.FixedFee =
Item.UserProperties("Fixed Fee")
If Item.UserProperties("FF-Accounts-Text1")<> "" Then
rst.FFAccountsText1 = Item.UserProperties("FF-Accounts-Text1")
rst.Update
rst.Close

End Sub

There are Lots more fields involved and all export ok, except those
that involve multi line text fields. Relevant line of code for
multi-line field:

"If Item.UserProperties("FF-Accounts-Text1")<> "" Then
rst.FFAccountsText1 = Item.UserProperties("FF-Accounts-Text1")"

In each of these only the first line of text (terminated with a CRLF)
sucessfully exports, any text after the first line is excluded.


Please help

Greg
 
S

Sue Mosher [MVP-Outlook]

I don't know why a memo field wouldn't access multi-line text data; you might want to ask about that in an Access group. But before you do: How are you checking the results in Access? Maybe you're looking at them in a way that can show only the first line?
 
G

greg

Sue,

Turns out you were right!


I was looking at the table in Access after the import and it was only
showing the first line, Change the row height in the table and all the
text was present.

Mark this one down as a fuss about nothing.

Thanks
Greg
 

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