PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

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

 
 
greg
Guest
Posts: n/a
 
      3rd Jun 2005
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

 
Reply With Quote
 
 
 
 
Sue Mosher [MVP-Outlook]
Guest
Posts: n/a
 
      3rd Jun 2005
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?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"greg" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> 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
>

 
Reply With Quote
 
greg
Guest
Posts: n/a
 
      3rd Jun 2005
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Querying Multi Line Text Box in MS Access Forms spindlebeakin10 Microsoft Access 0 9th Dec 2010 05:29 PM
Bypassing the custom field problem from Outlook to Access valentino_de_rogatis@yahoo.it Microsoft Access External Data 0 8th Jul 2007 01:08 PM
How do I create a multi-line text box in Access? =?Utf-8?B?SmVu?= Microsoft Access Forms 4 10th May 2005 09:53 PM
Preserving Line breaks when importing text into multi line text boxes. One Handed Man [ OHM ] Microsoft Access External Data 3 15th Sep 2003 05:15 PM
Preserving Line breaks when importing text into multi line text boxes. One Handed Man [ OHM ] Microsoft Access Queries 1 15th Sep 2003 05:15 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:31 PM.