Hi Could please tell me how to add or update SEO Focus keyphrase programmatically? I used this code but it doesn’t work: Read more
Hello, You need to give access Outlook with VBA, you need to activate the Microsoft Outlook Object Library. To activate it, go to Tools in the VBA editor > References. Activate Microsoft Outlook 16.0 Object Library : Then in a module use this subroutine: Sub sendAnEmail(ByRefRead more
Hello,
You need to give access Outlook with VBA, you need to activate the Microsoft Outlook Object Library.
To activate it, go to Tools in the VBA editor > References.
Activate Microsoft Outlook 16.0 Object Library :

Then in a module use this subroutine:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | Sub sendAnEmail(ByRef DomainName As String, ByRef SendTo As String, ByRef EmailSubject As String, ByRef EmailBody As String) 'refer to outlook application Dim EmailApp As Outlook.Application Dim Source As String 'launch outlook application Set EmailApp = New Outlook.Application 'refer to a new outlook email Dim EmailItem As Outlook.MailItem 'create a new outlook email Set EmailItem = EmailApp.CreateItem(olMailItem) EmailItem.To = SendTo 'the email adress who the email is sent to EmailItem.Subject = EmailSubject 'write your email subject in this variable EmailItem.HTMLBody = EmailBody Source = ThisWorkbook.FullName 'send the new email EmailItem.Send End Sub |
To test the code, call this code using a buton:
1 2 3 4 5 6 7 8 | Sub testSendEmail() Dim SendTo, EmailSubject, EmailBody As String SendTo = "myemail@example.com" ' put the email adress that will receive the email EmailSubject = "This is a send email test from Excel" ' write your subject EmailBody = "This email is sent from Execl using Microsoft outlook library" ' put the body sendAnEmail DomainName, SendTo, EmailSubject, EmailBody ' call the subroutine by passing the parameters End Sub |
Test:

I hope this will help you.
Good luck!
See less

Hi, I think Yoast SEO removed metakeywords. Please see this aricle : Meta keywords Why we don't use them - and neither should you use this key instead : _yoast_wpseo_focuskw You can update it like any post meta. This is the syntax: //the value of the focus key word $myFocusKeyword = "focus keyword eRead more
Hi,
I think Yoast SEO removed metakeywords. Please see this aricle :
Meta keywords Why we don’t use them – and neither should you
use this key instead :
You can update it like any post meta. This is the syntax:
I tested it and it works fine.
regards
See less