A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Specify formatting of HTMLBody in and outlook message



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 10th 09, 09:53 PM posted to microsoft.public.outlook.program_vba
Tigerfish
external usenet poster
 
Posts: 6
Default Specify formatting of HTMLBody in and outlook message

I have programmed a button on an Access form using VBA to automatically send
an Access report in HTML format as the body of an Outlook message. It works
as desired, keeping all the column formatting and spacing. The problem is
that long messages are truncated at the end of the first 'page' and have the
hyperlink paging buttons "First - Previous - Next - Last" at the bottom of
the message body. However, these links don't work and the report is just
truncated.

Is there any way to specify the size of the Outlook message body or turn the
paging hyperlinks off so that the entire report is included in the body of
the message. These reports are acknowledgement reports listing all materials
received for a project. They are rarely more than two report pages, but
often more than just one page.

In the past we have sent the reports as attachments but find that recipients
don't always open attachments. It would be great if we could send the
entire report in the body of the message instead.

Would appreciate any help.

Thanks.
--
Michelle
Ads
  #2  
Old June 10th 09, 11:35 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Specify formatting of HTMLBody in and outlook message

For either case you'd need to edit the raw HTML in what you send to Outlook
or directly in the HTMLBody property of the mail item.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Tigerfish" wrote in message
...
I have programmed a button on an Access form using VBA to automatically
send
an Access report in HTML format as the body of an Outlook message. It
works
as desired, keeping all the column formatting and spacing. The problem is
that long messages are truncated at the end of the first 'page' and have
the
hyperlink paging buttons "First - Previous - Next - Last" at the bottom of
the message body. However, these links don't work and the report is just
truncated.

Is there any way to specify the size of the Outlook message body or turn
the
paging hyperlinks off so that the entire report is included in the body of
the message. These reports are acknowledgement reports listing all
materials
received for a project. They are rarely more than two report pages, but
often more than just one page.

In the past we have sent the reports as attachments but find that
recipients
don't always open attachments. It would be great if we could send the
entire report in the body of the message instead.

Would appreciate any help.

Thanks.
--
Michelle


  #3  
Old June 11th 09, 12:13 AM posted to microsoft.public.outlook.program_vba
Tigerfish
external usenet poster
 
Posts: 6
Default Specify formatting of HTMLBody in and outlook message

I apologize if my question was to vague. That's exactly what I need help
with. How do I edit the HTML or change the properties of HTML body so the
the report is not truncated. The reports are nowhere near as large as the
max size for an Outlook message. So I'm assuming there's some way to keep
Outlook from chopping off part of the message.

My code to create the HTML document from an Access report and send the email
is very simple.

stDocName = "rptConfirmTapesRecd"
stOutputDocName = code to create a document name

DoCmd.OutputTo acReport, stDocName, acFormatHTML, stOutputDocName

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(stOutputDocName, 1) 'Read in data from report
stHTMLBody = f.readall
f.Close

' Create the Outlook session
Set objOutlook = CreateObject("Outlook.Application")

' Create the message
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(stProjEmail)
objOutlookRecip.Type = olTo
If intResponse = 0 Then
.BodyFormat = olFormatHTML
.Subject = "Tapes received for transcription" & " - " &
[ProjName]
.HTMLBody = stHTMLBody
End If
.Display
End With

I've searched online and Outlook Help but can't find any more info on
changing HTMLbody properties.

Any ideas?
--
Michelle


"Tigerfish" wrote:

I have programmed a button on an Access form using VBA to automatically send
an Access report in HTML format as the body of an Outlook message. It works
as desired, keeping all the column formatting and spacing. The problem is
that long messages are truncated at the end of the first 'page' and have the
hyperlink paging buttons "First - Previous - Next - Last" at the bottom of
the message body. However, these links don't work and the report is just
truncated.

Is there any way to specify the size of the Outlook message body or turn the
paging hyperlinks off so that the entire report is included in the body of
the message. These reports are acknowledgement reports listing all materials
received for a project. They are rarely more than two report pages, but
often more than just one page.

In the past we have sent the reports as attachments but find that recipients
don't always open attachments. It would be great if we could send the
entire report in the body of the message instead.

Would appreciate any help.

Thanks.
--
Michelle

  #4  
Old June 11th 09, 02:57 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Specify formatting of HTMLBody in and outlook message

HTMLBody is just a string you can retrieve from the email item. You get it
as a string and parse that string just as you would any other string, except
in this case you have to follow HTML formatting rules. No one here is going
to edit or write your HTML for you, you either have to be prepared to do
that or you need to hire someone who will do that for you.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Tigerfish" wrote in message
...
I apologize if my question was to vague. That's exactly what I need help
with. How do I edit the HTML or change the properties of HTML body so the
the report is not truncated. The reports are nowhere near as large as the
max size for an Outlook message. So I'm assuming there's some way to keep
Outlook from chopping off part of the message.

My code to create the HTML document from an Access report and send the
email
is very simple.

stDocName = "rptConfirmTapesRecd"
stOutputDocName = code to create a document name

DoCmd.OutputTo acReport, stDocName, acFormatHTML, stOutputDocName

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(stOutputDocName, 1) 'Read in data from
report
stHTMLBody = f.readall
f.Close

' Create the Outlook session
Set objOutlook = CreateObject("Outlook.Application")

' Create the message
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(stProjEmail)
objOutlookRecip.Type = olTo
If intResponse = 0 Then
.BodyFormat = olFormatHTML
.Subject = "Tapes received for transcription" & " - " &
[ProjName]
.HTMLBody = stHTMLBody
End If
.Display
End With

I've searched online and Outlook Help but can't find any more info on
changing HTMLbody properties.

Any ideas?
--
Michelle


  #5  
Old June 11th 09, 07:33 PM posted to microsoft.public.outlook.program_vba
Tigerfish
external usenet poster
 
Posts: 6
Default Specify formatting of HTMLBody in and outlook message

I'm not asking how to write html. My question is about the size of the
Outlook email message body. Is there a way to set the size of the body so
long messages, html or rtf or plain text, are not truncated when they are
added.

Perhaps I should re-post my question with a different title. My experience
programming for Outlook has been limited to creating an Outlooking session,
creating a mail item and sending it. My question must not be very clear.
--
Michelle


"Ken Slovak - [MVP - Outlook]" wrote:

HTMLBody is just a string you can retrieve from the email item. You get it
as a string and parse that string just as you would any other string, except
in this case you have to follow HTML formatting rules. No one here is going
to edit or write your HTML for you, you either have to be prepared to do
that or you need to hire someone who will do that for you.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Tigerfish" wrote in message
...
I apologize if my question was to vague. That's exactly what I need help
with. How do I edit the HTML or change the properties of HTML body so the
the report is not truncated. The reports are nowhere near as large as the
max size for an Outlook message. So I'm assuming there's some way to keep
Outlook from chopping off part of the message.

My code to create the HTML document from an Access report and send the
email
is very simple.

stDocName = "rptConfirmTapesRecd"
stOutputDocName = code to create a document name

DoCmd.OutputTo acReport, stDocName, acFormatHTML, stOutputDocName

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.OpenTextFile(stOutputDocName, 1) 'Read in data from
report
stHTMLBody = f.readall
f.Close

' Create the Outlook session
Set objOutlook = CreateObject("Outlook.Application")

' Create the message
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(stProjEmail)
objOutlookRecip.Type = olTo
If intResponse = 0 Then
.BodyFormat = olFormatHTML
.Subject = "Tapes received for transcription" & " - " &
[ProjName]
.HTMLBody = stHTMLBody
End If
.Display
End With

I've searched online and Outlook Help but can't find any more info on
changing HTMLbody properties.

Any ideas?
--
Michelle



  #6  
Old June 12th 09, 02:11 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Specify formatting of HTMLBody in and outlook message

If the entire message is contained within the body /body tags of the
HTML it will not be truncated. Depending on the recipient's display size for
messages and for the screen they might have to scroll to see all the message
but it will be there.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Tigerfish" wrote in message
...
I'm not asking how to write html. My question is about the size of the
Outlook email message body. Is there a way to set the size of the body so
long messages, html or rtf or plain text, are not truncated when they are
added.

Perhaps I should re-post my question with a different title. My
experience
programming for Outlook has been limited to creating an Outlooking
session,
creating a mail item and sending it. My question must not be very clear.
--
Michelle


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Message Formatting - thru Excel VBA amit Outlook and VBA 1 June 30th 08 02:25 PM
Formatting toolbar in New Message box Fran Outlook Express 5 June 17th 08 01:53 AM
Query re Outlook 2000 message formatting... D.R. Outlook and VBA 1 September 15th 07 01:32 PM
WordEditor Modify HTMLBODY Formatting lost krish Add-ins for Outlook 3 July 10th 07 03:06 PM
Message Text Formatting and Size Mary Hustad Outlook Express 1 January 27th 06 03:20 AM


All times are GMT +1. The time now is 10:26 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.