dekapperjr
Nieuwe gebruiker
- Lid geworden
- 28 jun 2011
- Berichten
- 3
Beste Mensen,
Ik wil een VBA scriptje schrijven voor outlook een standaard mail die ik wil versturen.
Code:
Sub Rate_request_FORWARDER_FCA_CFR() Dim OutApp As Object Dim OutMail As Object Dim strbody As String Dim SigString As String Dim Signature As String Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) strbody = "Dear ......,<br><br>" SigString = "C:\Documents and Settings\r.schut\Application Data\Microsoft\Handtekeningen\VLF General.htm" If Dir(SigString) <> "" Then Signature = GetBoiler(SigString) Else Signature = "" End If On Error Resume Next With OutMail .To = "" .CC = "" .BCC = "" .Subject = "Rate Request, Trade: FCA " .htmlBody = strbody & "<br><br>" & Signature .Attachments.Add ("C:\Documents and Settings\r.schut\Application Data\Microsoft\Handtekeningen\VLF General_files\image001.jpg") .Display ' or use.send End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = NothingEnd Sub
Nu wil ik in de mail een lijstje maken en hiervoor wil ik de "Tab" toets gebruiken hoe moet ik dit doen?
dus bijvoorbeeld
1)[TAB][TAB][TAB][TAB]Hong Kong
2)[TAB][TAB][TAB][TAB]New York
3 [TAB][TAB][TAB][TAB]Melbourne
ik het het geprobeerd als volgend:
Ik wil een VBA scriptje schrijven voor outlook een standaard mail die ik wil versturen.
Code:
Sub Rate_request_FORWARDER_FCA_CFR() Dim OutApp As Object Dim OutMail As Object Dim strbody As String Dim SigString As String Dim Signature As String Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) strbody = "Dear ......,<br><br>" SigString = "C:\Documents and Settings\r.schut\Application Data\Microsoft\Handtekeningen\VLF General.htm" If Dir(SigString) <> "" Then Signature = GetBoiler(SigString) Else Signature = "" End If On Error Resume Next With OutMail .To = "" .CC = "" .BCC = "" .Subject = "Rate Request, Trade: FCA " .htmlBody = strbody & "<br><br>" & Signature .Attachments.Add ("C:\Documents and Settings\r.schut\Application Data\Microsoft\Handtekeningen\VLF General_files\image001.jpg") .Display ' or use.send End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = NothingEnd Sub
Nu wil ik in de mail een lijstje maken en hiervoor wil ik de "Tab" toets gebruiken hoe moet ik dit doen?
dus bijvoorbeeld
1)[TAB][TAB][TAB][TAB]Hong Kong
2)[TAB][TAB][TAB][TAB]New York
3 [TAB][TAB][TAB][TAB]Melbourne
ik het het geprobeerd als volgend:
Code:
strbody ="dear ......., <br><br> _& "1)" & vbtab & Vbtab & "Hong Kong"
[\CODE]
[CODE]
strbody ="dear ......., <br><br> _& "1)" & [COLOR=#000000][FONT=Arial] [/FONT][/COLOR] & "Hong Kong"
[\CODE]
[CODE]
strbody ="dear ......., <br><br> _& "1)" & [COLOR=#000000][FONT=Courier New]Chr(9)[/FONT][/COLOR] & "Hong Kong"
[\CODE]
het bovenstaande werkt allemaal niet.
doe ik iets verkeerd? heeft iemand een idee?
mvg,
Robert