Formatting question (Access to outlook)

GaryPanic

Smoke me a Kipper,Skipper
Local time
Yesterday, 16:02
Joined
Nov 8, 2005
Messages
3,309
guys - i have a bit of code (below) pinched from the site somewhere ...
- anyway I need one fields ([Forms]![quotefrm]![ELLiability] ) to be formated as a standard format (ie 10,000,000)

(I have cut out a lot of the blurb in the emailsendbody...)

any pointers ...







Dim EmailApp, NameSpace, EmailSend As Object

Set EmailApp = CreateObject("Outlook.Application")
Set NameSpace = EmailApp.GetNamespace("MAPI")
Set EmailSend = EmailApp.CreateItem(0)


EmailSend.To = [Forms]![quotefrm]!
EmailSend.Subject = " Our Reference :-" & " " & [Forms]![quotefrm]![QuoteNo] & " - " & "(" & [Forms]![quotefrm]![Insured] & ")"



EmailSend.body = "For the Attention of :- " & Chr(9) & [Forms]![quotefrm]![POC] & vbCrLf & "Employers Liability " & [Forms]![quotefrm]![ELLiability] &










'EmailSend.Attachments.Add "C:\temp\cancellation.xls"
EmailSend.Display

Set EmailApp = Nothing
Set NameSpace = Nothing
Set EmailSend = Nothing

'Kill "C:\temp\test2.xls"

End Sub
 
Something like:

EmailSend.body = "For the Attention of :- " & Chr(9) & [Forms]![quotefrm]![POC] & vbCrLf & "Employers Liability " & Format([Forms]![quotefrm]![ELLiability],"#,###,###") &
 
so it follows switch funtion in word ...
ok i'll try and let you know .

another one - the line of code is quite long how do I get it to continue onthe next line ?
 
another one - the line of code is quite long how do I get it to continue onthe next line ?
Do you mean in the body or the code?

If in the Body then are you using HTML format for your email? If so, you would concatenate a

</br>

in to the code.
 
I think i have found it underscore _....
 
Yes, for code it is the underscore. Sorry I thought you were talking about the actual email.
 

Users who are viewing this thread

Back
Top Bottom