VBA word, why no return address?

Chrisjd2

Board Regular
Joined
Mar 1, 2016
Messages
61
I seem to be posting alot here lol..

why does the return address no show on my page?

Code:
If society = "" Then    rtnAddress = False
Else
    rtnAddress = society & " - Stake " & stake
End If


'objDoc.Envelope.Insert(,strAddress,,,rtnaddress,,, "C5")


With objDoc.Envelope
 .Insert Address:=strAddress, returnaddress:=rtnAddress
End With

Its not turning the R and A to capitals 'returnaddress' , so it obviously doesn't recognize it?.. Although it is in the syntax..

Cheers
Chris
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Chris

Named arguments will not be automatically capitalised, however if the named argument isn't recognised then VBA will tell you so.

Have you checked that the value(s) of strAddress and rtnAddress actually are?
 
Upvote 0
Chris

Named arguments will not be automatically capitalised, however if the named argument isn't recognised then VBA will tell you so.

Have you checked that the value(s) of strAddress and rtnAddress actually are?

Ok, Yes, both strAddress and rtnAddress returns a string of text, the Address works fine, its just the ReturnAddress that isn't working...

If you look here this is the syntax I am using..

https://msdn.microsoft.com/en-us/vba/word-vba/articles/envelope-object-word
 
Upvote 0

Forum statistics

Threads
1,216,113
Messages
6,128,905
Members
449,478
Latest member
Davenil

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top