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

Not able to add default Signature



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 10th 06, 09:29 PM posted to microsoft.public.outlook.program_vba
antonio
external usenet poster
 
Posts: 13
Default Not able to add default Signature

I am using the following to send an email from Excel.

I would like to add a signature to the email. I have a signature for the
default email account and another one, identical, named "Default Signature"
but no signature comes up.

Thanks.


Sub send_email_confirm_traded_with_BGTrade()

Dim to_recipient, side As String
Dim objOL As New Outlook.Application
Dim objMail As MailItem

Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)




Worksheets("SPLIT").Activate

Application.Calculation = xlCalculationManual


Select Case UCase(Range("Exchange"))

Case "US"
to_recipient = "
Case "UN"
to_recipient = "
Case "UQ"
to_recipient = "
Case Else
to_recipient = "

End Select


If Range("Total_shares_traded") 0 Then

side = "Sold at "
Else
side = "Bought at "
End If

With objMail
.To = to_recipient
.CC = "trade"
.Subject = Range("name") & ", " & UCase(Range("ticker"))
.BodyFormat = olFormatHTML

.HTMLBody = "HTMLBODYB" & side & Range("currency") & " " &
FormatNumber(Cells(15, 15), 4) & " with Tradebook on " & Range("trade_date")
& "/bbr/br " & _
"ULTABLE border='1' width='230'TRTD width='140'" & _
Cells(12, 13) & "/TDTD align='right'" & FormatNumber(Cells(12, 15),
0) & _
"/TD/TRTRTD" & Cells(13, 13) & "/TDTD align='right'" &
FormatNumber(Cells(13, 15), 0) & _
"/TD/TRTRTD/TDTD align='right'B" & FormatNumber(Cells(11,
15), 0) & "/B/TD/TR/TABLE/UL" & _
"brb Antonio J. SalcedobrNordkapp/b/br/BODY/HTML"

.display

Set objMail = Nothing
Set objOL = Nothing

End With

' Call update_inventory("T")

Application.Calculation = xlCalculationAutomatic


End Sub
  #2  
Old May 11th 06, 06:25 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Not able to add default Signature

Am Wed, 10 May 2006 12:29:01 -0700 schrieb Antonio:

Please display the Item first and add your text to the body (instead of
overwriting the body): Sample:

..HTMLBody = YourText & .HTMLBody

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


I am using the following to send an email from Excel.

I would like to add a signature to the email. I have a signature for the
default email account and another one, identical, named "Default

Signature"
but no signature comes up.

Thanks.


Sub send_email_confirm_traded_with_BGTrade()

Dim to_recipient, side As String
Dim objOL As New Outlook.Application
Dim objMail As MailItem

Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)




Worksheets("SPLIT").Activate

Application.Calculation = xlCalculationManual


Select Case UCase(Range("Exchange"))

Case "US"
to_recipient = "
Case "UN"
to_recipient = "
Case "UQ"
to_recipient = "
Case Else
to_recipient = "

End Select


If Range("Total_shares_traded") 0 Then

side = "Sold at "
Else
side = "Bought at "
End If

With objMail
.To = to_recipient
.CC = "trade"
.Subject = Range("name") & ", " & UCase(Range("ticker"))
.BodyFormat = olFormatHTML

.HTMLBody = "HTMLBODYB" & side & Range("currency") & " " &
FormatNumber(Cells(15, 15), 4) & " with Tradebook on " &

Range("trade_date")
& "/bbr/br " & _
"ULTABLE border='1' width='230'TRTD width='140'" & _
Cells(12, 13) & "/TDTD align='right'" & FormatNumber(Cells(12,

15),
0) & _
"/TD/TRTRTD" & Cells(13, 13) & "/TDTD align='right'" &
FormatNumber(Cells(13, 15), 0) & _
"/TD/TRTRTD/TDTD align='right'B" &

FormatNumber(Cells(11,
15), 0) & "/B/TD/TR/TABLE/UL" & _
"brb Antonio J. SalcedobrNordkapp/b/br/BODY/HTML"

.display

Set objMail = Nothing
Set objOL = Nothing

End With

' Call update_inventory("T")

Application.Calculation = xlCalculationAutomatic


End Sub

  #3  
Old May 11th 06, 11:13 AM posted to microsoft.public.outlook.program_vba
antonio
external usenet poster
 
Posts: 13
Default Not able to add default Signature

Hi Michael,

Thank you for your help.

I have tried what you mention but it does not work.

I can manage to get the default signature if I do not have any Body. I also
get the inconvenient message "another pogram is trying to access Outlook".

As soon as I enter an .HTMLBody it overwrites the signature.

Can you give me a specific code example.

Much obliged.

Antonio

"Michael Bauer" wrote:

Am Wed, 10 May 2006 12:29:01 -0700 schrieb Antonio:

Please display the Item first and add your text to the body (instead of
overwriting the body): Sample:

..HTMLBody = YourText & .HTMLBody

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


I am using the following to send an email from Excel.

I would like to add a signature to the email. I have a signature for the
default email account and another one, identical, named "Default

Signature"
but no signature comes up.

Thanks.


Sub send_email_confirm_traded_with_BGTrade()

Dim to_recipient, side As String
Dim objOL As New Outlook.Application
Dim objMail As MailItem

Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)




Worksheets("SPLIT").Activate

Application.Calculation = xlCalculationManual


Select Case UCase(Range("Exchange"))

Case "US"
to_recipient = "
Case "UN"
to_recipient = "
Case "UQ"
to_recipient = "
Case Else
to_recipient = "

End Select


If Range("Total_shares_traded") 0 Then

side = "Sold at "
Else
side = "Bought at "
End If

With objMail
.To = to_recipient
.CC = "trade"
.Subject = Range("name") & ", " & UCase(Range("ticker"))
.BodyFormat = olFormatHTML

.HTMLBody = "HTMLBODYB" & side & Range("currency") & " " &
FormatNumber(Cells(15, 15), 4) & " with Tradebook on " &

Range("trade_date")
& "/bbr/br " & _
"ULTABLE border='1' width='230'TRTD width='140'" & _
Cells(12, 13) & "/TDTD align='right'" & FormatNumber(Cells(12,

15),
0) & _
"/TD/TRTRTD" & Cells(13, 13) & "/TDTD align='right'" &
FormatNumber(Cells(13, 15), 0) & _
"/TD/TRTRTD/TDTD align='right'B" &

FormatNumber(Cells(11,
15), 0) & "/B/TD/TR/TABLE/UL" & _
"brb Antonio J. SalcedobrNordkapp/b/br/BODY/HTML"

.display

Set objMail = Nothing
Set objOL = Nothing

End With

' Call update_inventory("T")

Application.Calculation = xlCalculationAutomatic


End Sub


  #4  
Old May 11th 06, 02:22 PM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Not able to add default Signature

Am Thu, 11 May 2006 02:13:01 -0700 schrieb Antonio:

I gave you a sample. Please pay attention to the last line of my former
message. You need to replace "YourText" by whatever you want to write, of
course.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi Michael,

Thank you for your help.

I have tried what you mention but it does not work.

I can manage to get the default signature if I do not have any Body. I

also
get the inconvenient message "another pogram is trying to access Outlook".

As soon as I enter an .HTMLBody it overwrites the signature.

Can you give me a specific code example.

Much obliged.

Antonio

"Michael Bauer" wrote:

Am Wed, 10 May 2006 12:29:01 -0700 schrieb Antonio:

Please display the Item first and add your text to the body (instead of
overwriting the body): Sample:

..HTMLBody = YourText & .HTMLBody

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


I am using the following to send an email from Excel.

I would like to add a signature to the email. I have a signature for the
default email account and another one, identical, named "Default

Signature"
but no signature comes up.

Thanks.


Sub send_email_confirm_traded_with_BGTrade()

Dim to_recipient, side As String
Dim objOL As New Outlook.Application
Dim objMail As MailItem

Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)




Worksheets("SPLIT").Activate

Application.Calculation = xlCalculationManual


Select Case UCase(Range("Exchange"))

Case "US"
to_recipient = "
Case "UN"
to_recipient = "
Case "UQ"
to_recipient = "
Case Else
to_recipient = "

End Select


If Range("Total_shares_traded") 0 Then

side = "Sold at "
Else
side = "Bought at "
End If

With objMail
.To = to_recipient
.CC = "trade"
.Subject = Range("name") & ", " & UCase(Range("ticker"))
.BodyFormat = olFormatHTML

.HTMLBody = "HTMLBODYB" & side & Range("currency") & " " &
FormatNumber(Cells(15, 15), 4) & " with Tradebook on " &

Range("trade_date")
& "/bbr/br " & _
"ULTABLE border='1' width='230'TRTD width='140'" & _
Cells(12, 13) & "/TDTD align='right'" & FormatNumber(Cells(12,

15),
0) & _
"/TD/TRTRTD" & Cells(13, 13) & "/TDTD align='right'" &
FormatNumber(Cells(13, 15), 0) & _
"/TD/TRTRTD/TDTD align='right'B" &

FormatNumber(Cells(11,
15), 0) & "/B/TD/TR/TABLE/UL" & _
"brb Antonio J. SalcedobrNordkapp/b/br/BODY/HTML"

.display

Set objMail = Nothing
Set objOL = Nothing

End With

' Call update_inventory("T")

Application.Calculation = xlCalculationAutomatic


End Sub


  #5  
Old May 11th 06, 03:14 PM posted to microsoft.public.outlook.program_vba
antonio
external usenet poster
 
Posts: 13
Default Not able to add default Signature

I have tried:

With objMail
.To = to_recipient
.CC = "trade"
.Subject = Range("name") & ", " & UCase(Range("ticker"))
.BodyFormat = olFormatHTML

.display

.HTMLBody = "text" & .HTMLBody


Set objMail = Nothing
Set objOL = Nothing

End With


but although I get the signature, I see no body text
"Michael Bauer" wrote:

Am Thu, 11 May 2006 02:13:01 -0700 schrieb Antonio:

I gave you a sample. Please pay attention to the last line of my former
message. You need to replace "YourText" by whatever you want to write, of
course.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi Michael,

Thank you for your help.

I have tried what you mention but it does not work.

I can manage to get the default signature if I do not have any Body. I

also
get the inconvenient message "another pogram is trying to access Outlook".

As soon as I enter an .HTMLBody it overwrites the signature.

Can you give me a specific code example.

Much obliged.

Antonio

"Michael Bauer" wrote:

Am Wed, 10 May 2006 12:29:01 -0700 schrieb Antonio:

Please display the Item first and add your text to the body (instead of
overwriting the body): Sample:

..HTMLBody = YourText & .HTMLBody

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


I am using the following to send an email from Excel.

I would like to add a signature to the email. I have a signature for the
default email account and another one, identical, named "Default
Signature"
but no signature comes up.

Thanks.


Sub send_email_confirm_traded_with_BGTrade()

Dim to_recipient, side As String
Dim objOL As New Outlook.Application
Dim objMail As MailItem

Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)




Worksheets("SPLIT").Activate

Application.Calculation = xlCalculationManual


Select Case UCase(Range("Exchange"))

Case "US"
to_recipient = "
Case "UN"
to_recipient = "
Case "UQ"
to_recipient = "
Case Else
to_recipient = "

End Select


If Range("Total_shares_traded") 0 Then

side = "Sold at "
Else
side = "Bought at "
End If

With objMail
.To = to_recipient
.CC = "trade"
.Subject = Range("name") & ", " & UCase(Range("ticker"))
.BodyFormat = olFormatHTML

.HTMLBody = "HTMLBODYB" & side & Range("currency") & " " &
FormatNumber(Cells(15, 15), 4) & " with Tradebook on " &
Range("trade_date")
& "/bbr/br " & _
"ULTABLE border='1' width='230'TRTD width='140'" & _
Cells(12, 13) & "/TDTD align='right'" & FormatNumber(Cells(12,
15),
0) & _
"/TD/TRTRTD" & Cells(13, 13) & "/TDTD align='right'" &
FormatNumber(Cells(13, 15), 0) & _
"/TD/TRTRTD/TDTD align='right'B" &
FormatNumber(Cells(11,
15), 0) & "/B/TD/TR/TABLE/UL" & _
"brb Antonio J. SalcedobrNordkapp/b/br/BODY/HTML"

.display

Set objMail = Nothing
Set objOL = Nothing

End With

' Call update_inventory("T")

Application.Calculation = xlCalculationAutomatic


End Sub


  #6  
Old May 12th 06, 07:32 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Not able to add default Signature

Am Thu, 11 May 2006 06:14:02 -0700 schrieb Antonio:

Antonio, if your code doesn´t raise an error there´s no way arround: The
following line can´t write the HTMLBody into HTMLBody without also writing
"text" into it.

.HTMLBody = "text" & .HTMLBody


Do you use an "On Error Resume Next" statment? If so, what happens if you
comment that out?


--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


I have tried:

With objMail
.To = to_recipient
.CC = "trade"
.Subject = Range("name") & ", " & UCase(Range("ticker"))
.BodyFormat = olFormatHTML

.display



Set objMail = Nothing
Set objOL = Nothing

End With


but although I get the signature, I see no body text
"Michael Bauer" wrote:

Am Thu, 11 May 2006 02:13:01 -0700 schrieb Antonio:

I gave you a sample. Please pay attention to the last line of my former
message. You need to replace "YourText" by whatever you want to write, of
course.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


Hi Michael,

Thank you for your help.

I have tried what you mention but it does not work.

I can manage to get the default signature if I do not have any Body. I

also
get the inconvenient message "another pogram is trying to access

Outlook".

As soon as I enter an .HTMLBody it overwrites the signature.

Can you give me a specific code example.

Much obliged.

Antonio

"Michael Bauer" wrote:

Am Wed, 10 May 2006 12:29:01 -0700 schrieb Antonio:

Please display the Item first and add your text to the body (instead of
overwriting the body): Sample:

..HTMLBody = YourText & .HTMLBody

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --


I am using the following to send an email from Excel.

I would like to add a signature to the email. I have a signature for

the
default email account and another one, identical, named "Default
Signature"
but no signature comes up.

Thanks.


Sub send_email_confirm_traded_with_BGTrade()

Dim to_recipient, side As String
Dim objOL As New Outlook.Application
Dim objMail As MailItem

Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)




Worksheets("SPLIT").Activate

Application.Calculation = xlCalculationManual


Select Case UCase(Range("Exchange"))

Case "US"
to_recipient = "
Case "UN"
to_recipient = "
Case "UQ"
to_recipient = "
Case Else
to_recipient = "

End Select


If Range("Total_shares_traded") 0 Then

side = "Sold at "
Else
side = "Bought at "
End If

With objMail
.To = to_recipient
.CC = "trade"
.Subject = Range("name") & ", " & UCase(Range("ticker"))
.BodyFormat = olFormatHTML

.HTMLBody = "HTMLBODYB" & side & Range("currency") & " " &
FormatNumber(Cells(15, 15), 4) & " with Tradebook on " &
Range("trade_date")
& "/bbr/br " & _
"ULTABLE border='1' width='230'TRTD width='140'" & _
Cells(12, 13) & "/TDTD align='right'" & FormatNumber(Cells(12,
15),
0) & _
"/TD/TRTRTD" & Cells(13, 13) & "/TDTD align='right'" &
FormatNumber(Cells(13, 15), 0) & _
"/TD/TRTRTD/TDTD align='right'B" &
FormatNumber(Cells(11,
15), 0) & "/B/TD/TR/TABLE/UL" & _
"brb Antonio J. SalcedobrNordkapp/b/br/BODY/HTML"

.display

Set objMail = Nothing
Set objOL = Nothing

End With

' Call update_inventory("T")

Application.Calculation = xlCalculationAutomatic


End Sub


 




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
How to add signature in a single mail? anders bitzer Outlook - General Queries 1 April 10th 06 10:31 AM
setting signature as default drmeh Outlook and VBA 0 March 6th 06 01:59 AM
Can I add a default Subject to my signature file? Aaron_I Outlook - Using Forms 0 February 23rd 06 01:11 AM
Can I add a default Subject to my signature file? Aaron_I Outlook - Installation 0 February 22nd 06 08:36 PM
Add signature to calendar meeting request markj Outlook - Calandaring 11 February 12th 06 11:33 PM


All times are GMT +1. The time now is 11:25 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.