LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Controlling the position of attachments and Body Text in Outlook

Richard

The Position argument is a long integer that relates to the character of the
Body string. So if you want your icon to be in the middle of a sentence,
you could do this

With olMi
.Body = "This is my attachment"
.Attachments.Add "Book1.xls", , 5
End With

and it will look like this

This <<attachment is my attachment

where <<attachment is the icon.

Note that the fifth character in the Body string is replaced (not inserted),
so you need to throw an extra space in your Body string or lose characters.

I don't know how to change the appearance of the icon. You can use the
DisplayName argument to make a shorter name.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Richard Buttrey" wrote in message
...
I have some VBA code which loops through a list of Excel files,
attaches them to an Outlokk email and sends them.

Everything works fine except that I'd like a bit more control over
where the file attachments and the Body text are placed.

The default seems to be the files first - horizontally as the first
'line' of the email, followed immediately underneath by the text of
the "Body Text' Parameter. I'd also like to be able to alter the size
of the embedded file 'icon' since the default size truncates the name
of the file and makes it difficult to see at a glance.

I can see that the

.Attachments.Add

has various parameter like Type, Position, Display Name etc., although
Im not altogether clear how to use these.

All help gratefully received.

Richard Buttrey




__
"We are with Europe, but not of it. We are linked but not combined.
We are associated but not absorbed. And should European statesmen address
us and say, 'Shall we speak for thee?', we should reply,
'Nay Sir, for we dwell among our own people'."
Winston Churchill - 1953"

Richard Buttrey, Grappenhall, Cheshire, UK



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot open Excel (.xls) attachments in Outlook childofthe1980s Excel Discussion (Misc queries) 1 May 29th 10 12:11 AM
Send a Sheet as body of Outlook Email David Ackerman on cape cod Excel Discussion (Misc queries) 0 March 19th 10 03:11 PM
Excel Attachments not opening in Outlook gish Excel Discussion (Misc queries) 1 June 6th 06 09:49 PM
Outlook Webmail and Attachments Jane Excel Discussion (Misc queries) 0 October 12th 05 06:19 PM
Controlling Outlook from Excel Using VBA Trevor Shuttleworth Excel Programming 1 September 9th 03 10:43 PM


All times are GMT +1. The time now is 08:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"