#  Other Applications & Softwares  > Outlook Formatting & Functions >  > [SOLVED] outlook VBA: how to add alternative signature to email instead of the default

## Marijke

Hi,

Nearly all macro's I have found all add the default signature to the email string, but I have a certain signature I want to add to specific responses.
Let's say this signature name is "ABCDE" 

How can I add this to the outlook VBA?

----------


## humdingaling

have you tried Ron's code?

http://www.rondebruin.nl/win/s1/outlook/signature.htm

----------


## Marijke

I have, and this is great for creating new emails, 
but mine is going to be a reply or forward to an existing email, keeping the existing attachments and email string.

btw, this is the code I already have and where I only need to add the signature change




```
Please Login or Register  to view this content.
```

----------


## humdingaling

Outlook VBA is not really my area but all i can suggest is maybe something like the below code
whereby you "grab" the signature and shove it into the body
it works in my trial but....i found the formatting to be off because my signature is in HTML 




```
Please Login or Register  to view this content.
```

----------


## Marijke

Like my VBA, this one grabs the default signature, only yours is in plain text, while mine kept it in html.
I have also used Ron de Bruins page and tried to combine, but no luck so far.
I'm sure there must be a line inserted somewhere, where you can tell VBA to pull a certain signature forward, I just can't manage to put it together.
(or I might have missed on a Dim.... As.... instruction)





```
Please Login or Register  to view this content.
```

----------


## skatonni

```
Please Login or Register  to view this content.
```

----------


## Marijke

I have been OOO for some time and finally got around to reworking this 'problem' of mine.
I almost got it to do what I need to, (with the help of skatonni!) but I have 1 problem yet to solve;
How do I change the subject line?

I used to replace certain words with others, but I somehow can't get it to incorporate in the new module....
For example, subject says Good morning Marijke, nice to see you
and I want it to say, Good afternoon team, nice to see you





```
Please Login or Register  to view this content.
```

----------


## humdingaling

wow very old thread  :EEK!: 




```
Please Login or Register  to view this content.
```


cant you just add .subject?
like so



```
Please Login or Register  to view this content.
```

----------


## Marijke

yeah, I know... I should be ashamed  :Wink:  

tried that trick you suggested, (and a couple of others actually) 
but it replaces the entire subject line (and in the other things I tried it just ignores it completely and leaves the subject line as is.)

----------


## humdingaling

```
Please Login or Register  to view this content.
```


what you had above for subject, i modified it slightly 
made the variable strSub instead of subject to make it more clear 

also you dont need boiler separate i added it directly into the code

----------


## humdingaling

cleaned it up some more and added more descriptions




```
Please Login or Register  to view this content.
```


i am assuming you only want to mark unread & "processing" for mail items which you actually process

----------


## Marijke

Exactly what I was looking for humdingaling!!
works like a charm  :Smilie:  

Big thanks from my end, and case closed.....  :Cool:

----------


## humdingaling

not a problem
good to hear

i learnt a thing or two since you first started the thread  :Wink:

----------


## LJMetzger

Thanks humdingaling for code that is very useful.

I know this is an old thread, however if there is an embedded image in the Signature, the embedded image will not be displayed.  The following code (important parts in *red*) should take care of that problem:



```
Please Login or Register  to view this content.
```


Lewis

----------

