Re: Size limit on exporting strings from Outlook forms to Excel
From: Sue Mosher [MVP-Outlook] (suemvp_at_outlookcode.com)
Date: 02/25/04
- Next message: Jason Stroup: "Re: Size limit on exporting strings from Outlook forms to Excel"
- Previous message: Sue Mosher [MVP-Outlook]: "Re: Survey Form at SlipStick.com - data validation"
- In reply to: Jason Stroup: "Size limit on exporting strings from Outlook forms to Excel"
- Next in thread: Jason Stroup: "Re: Size limit on exporting strings from Outlook forms to Excel"
- Reply: Jason Stroup: "Re: Size limit on exporting strings from Outlook forms to Excel"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 25 Feb 2004 14:45:15 -0500
What version of Excel? Versions from 2000 on should be able to handle up to
32k characters in a cell.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"Jason Stroup" <j.stroup@sportsmedia.com> wrote in message
news:63fe0f15.0402250841.6ad22621@posting.google.com...
> I am trying to print an Outlook Form from the form itself using a
> print button. The form is a vacation day approved form, and the code
> behind the button looks like the code below. It works fine as long as
> the text strings are short, but the last three strings - conflicts,
> resolutions and comments can be longer than 255 characters. When this
> happens, it prints out #VALUE! instead of the text. ANy ideas on how
> to fix this?
>
> Thanks
>
> Function cmdPrint_Click()
> Set oExcelApp = CreateObject("excel.application")
> If oExcelApp Is Nothing Then
> MsgBox "Couldn't start Excel."
> Else
> Dim oExcelApp
> Dim oExcelDoc
> Dim ApplicationName
>
> ' Open a new document
> Set oDoc = oExcelApp.Workbooks.Open("\\Dc2-srv\SportsMEDIA
> Shares\SMTShare\Adm\Holidays & Vacations\Vacation Sick Print
> Form.xls")
>
> If Item.UserProperties("RequestType") = "VACATION" Then
> oDoc.worksheets("Vacation Day(s) Request Form").range("F5").Value =
> " - Request for Vacation Days"
> Else
> oDoc.worksheets("Vacation Day(s) Request Form").range("F5").Value =
> " - Request for Sick/Personal Days"
> End If
>
> oDoc.worksheets("Vacation Day(s) Request Form").range("D7").Value =
> Item.UserProperties("Employee")
> oDoc.worksheets("Vacation Day(s) Request Form").range("D9").Value =
> Item.UserProperties("Supervisor")
> oDoc.worksheets("Vacation Day(s) Request Form").range("D11").Value =
> Item.UserProperties("Director")
>
> oDoc.worksheets("Vacation Day(s) Request Form").range("L7").Value =
> Item.UserProperties("StartDate")
> oDoc.worksheets("Vacation Day(s) Request Form").range("L9").Value =
> Item.UserProperties("EndDate")
> oDoc.worksheets("Vacation Day(s) Request Form").range("L11").Value =
> Item.UserProperties("DaysRequested")
>
> oDoc.worksheets("Vacation Day(s) Request Form").range("E16").Value =
> Item.UserProperties("TotalDays")
> oDoc.worksheets("Vacation Day(s) Request Form").range("E18").Value =
> Item.UserProperties("DaysTaken")
> oDoc.worksheets("Vacation Day(s) Request Form").range("E20").Value =
> Item.UserProperties("DaysRemaining")
>
> oDoc.worksheets("Vacation Day(s) Request Form").range("L16").Value =
> Item.UserProperties("TotalDays")
> oDoc.worksheets("Vacation Day(s) Request Form").range("L18").Value =
> Item.UserProperties("AfterDaysTaken")
> oDoc.worksheets("Vacation Day(s) Request Form").range("L20").Value =
> Item.UserProperties("AfterDaysRemaining")
>
> oDoc.worksheets("Vacation Day(s) Request Form").range("D25").Value
> Item.UserProperties("Conflicts")
> oDoc.worksheets("Vacation Day(s) Request Form").range("D31").Value
> Item.UserProperties("Resolutions")
> oDoc.worksheets("Vacation Day(s) Request Form").range("D37").Value
> Item.UserProperties("Comment")
>
> ' Print the Excel document
> oDoc.PrintOut
> ' Close and don't save changes to the document
> Const wdDoNotSaveChanges = 0
> oDoc.Close wdDoNotSaveChanges
>
> ' Close the Excel instance
> oExcelApp.Quit
>
> ' Clean up
> Set oDoc = Nothing
> Set oExcelApp = Nothing
> End If
> End Function
- Next message: Jason Stroup: "Re: Size limit on exporting strings from Outlook forms to Excel"
- Previous message: Sue Mosher [MVP-Outlook]: "Re: Survey Form at SlipStick.com - data validation"
- In reply to: Jason Stroup: "Size limit on exporting strings from Outlook forms to Excel"
- Next in thread: Jason Stroup: "Re: Size limit on exporting strings from Outlook forms to Excel"
- Reply: Jason Stroup: "Re: Size limit on exporting strings from Outlook forms to Excel"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|