VBA - MailMerge.Fields.Update??

J

Jado

Hi

i'm trying to create a dynamic hyperlink in a MailMerge document.

{HYPERLINK "mailto: (e-mail address removed)?subject=Email Regarding: {MERGEFIELD
Company}&body=RecordID: {MERGEFIELD Rec_ID}"}

this works, but only if i manually right click over the hyperlink after the
merge has finished and select Update Field from the popup menu.

i've tried adding the following code, but with no success..

......
wdDoc.MailMerge.Execute
wdDoc.Fields.Update
wdDoc.SaveAs......
......

can anyone help?

thanks
Jado
 
J

Jado

I've worked this one outusing SendKeys, but if there's a more robust way,
please let me know
wdDoc.MailMerge.Execute
SendKeys "^a" ' Ctrl+a, Selects all fields in the document
SendKeys "{F9}" 'F9 FunctionKey, Updates all fields in
document

remove the

wdDoc.Fields.Update

as this has no effect.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top