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

Adding af signature file at the end of the body text



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 5th 08, 01:26 PM posted to microsoft.public.outlook.program_vba
kurt
external usenet poster
 
Posts: 2
Default Adding af signature file at the end of the body text

Hi

I tried to put in the signature after I have made a mailtext in VBA ,
but the text is replaced by the signature

the code is like this

v=" Myletter text"
With OutMail
.to = "
.CC = ""
.BCC = ""
.Subject = "Subject text"

.body = v & Chr(13) & shell(" path\mydoc.htm")
end with

Anyone have a solution

regards

kurt
Ads
  #2  
Old February 5th 08, 03:02 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Adding af signature file at the end of the body text

If you want to append and not replace text, you need to include the original text:

.Body = .Body & vbCrLf & "some new text"

You probably have a bit more work to do, though, but I can't quite tell what you're trying to do. I do know that a Shell command is not going to read the content of the HTML file into a string variable. Neither is HTML content going to translate well into the text body of the message.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"kurt" wrote in message ...
Hi

I tried to put in the signature after I have made a mailtext in VBA ,
but the text is replaced by the signature

the code is like this

v=" Myletter text"
With OutMail
.to = "
.CC = ""
.BCC = ""
.Subject = "Subject text"

.body = v & Chr(13) & shell(" path\mydoc.htm")
end with

Anyone have a solution

regards

kurt

  #3  
Old February 5th 08, 03:50 PM posted to microsoft.public.outlook.program_vba
kurt
external usenet poster
 
Posts: 2
Default Adding af signature file at the end of the body text

Thank you Sue

I have a signature function on Outlook but I can not control it from
VBA.
This means that your "some new text" should be the text in the
signature file either a .HTM or a .DOC or a .RTF file
or just turn on the insert signature function form VBA

regards

Kurt

  #4  
Old February 5th 08, 05:03 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Adding af signature file at the end of the body text

If you're trying to use an existing signature, you probably don't need to read in the text. See http://www.outlookcode.com/codedetail.aspx?id=615 for code sample.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"kurt" wrote in message ...
Thank you Sue

I have a signature function on Outlook but I can not control it from
VBA.
This means that your "some new text" should be the text in the
signature file either a .HTM or a .DOC or a .RTF file
or just turn on the insert signature function form VBA


"Sue Mosher [MVP-Outlook]" wrote in message ...
If you want to append and not replace text, you need to include the original text:

.Body = .Body & vbCrLf & "some new text"

You probably have a bit more work to do, though, but I can't quite tell what you're trying to do. I do know that a Shell command is not going to read the content of the HTML file into a string variable. Neither is HTML content going to translate well into the text body of the message.


"kurt" wrote in message ...
Hi

I tried to put in the signature after I have made a mailtext in VBA ,
but the text is replaced by the signature

the code is like this

v=" Myletter text"
With OutMail
.to = "
.CC = ""
.BCC = ""
.Subject = "Subject text"

.body = v & Chr(13) & shell(" path\mydoc.htm")
end with

Anyone have a solution

regards

kurt

 




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
Adding signatu only option is *.rtf file for template Steve Pitt Outlook - Installation 0 February 6th 07 01:01 AM
Append Body of Email to Text File J Outlook and VBA 1 September 11th 06 06:10 AM
When Adding Text To The Body A Warning message is prompted MeMatthew Outlook - General Queries 2 August 31st 06 12:55 PM
File content to be the text body of mail [email protected] Outlook and VBA 1 August 3rd 06 12:23 PM
Adding HTML text to the email body for each recipient Tom at GSD Add-ins for Outlook 2 July 6th 06 11:25 PM


All times are GMT +1. The time now is 03:36 PM.


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.