Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Raza Raza is offline
external usenet poster
 
Posts: 1
Default Hyperlinks and html images in mailmerge

I'm trying to achieve the following via Mail Merge (initiated by MS CRM 4).

We are creating a marketing email that is supposed to have hyperlinks tagged
with the lead id. E.g. http://www.ultralearn.com/default.aspx?leadid=abcd-efgh

Although this is doable but the entire link must be visible as text. If I do
Ctl+K and place the link in there, the mail merge doesn't replace the lead id
merge field. It remains as ?leadid=Lead.

I found a macro-solution. I wrote the macro and yes I can append the field
to the hyperlink.address. But I'm not able to use this document that has the
macro in it, in the mail merge. CRM will not allow me to upload a word doc
with macro. I must send the emails from CRM, so that CRM knows that emails
have been sent to which leads.

Another issue is that I want to place an image in the mail that pulls
dynamically from a website. E.g. img
src="http://www.ultralearn.com/abcd.gif" /

In other words, when a recepient opens their email, the image should load
from the http location and not embedded in the word doc itself.

I am unable to find a place to insert such an html.

Please advise.

Thanks


  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod[_2_] macropod[_2_] is offline
external usenet poster
 
Posts: 2,059
Default Hyperlinks and html images in mailmerge

Hi Raza,

You could solve both problems by embedding the mergefield and whatever associated path information you have in a HYPERLINK field.
For example, if the hyperlink path is:
http: //www.ultralearn.com/default.aspx?leadid=«Lead»
you could select all of that and press Ctrl-F9 to embed the string in another field, thus:
{ http: //www.ultralearn.com/default.aspx?leadid=«Lead» }
which you could then edit to read:
{HYPERLINK "http: //www.ultralearn.com/default.aspx?leadid=«Lead»"}
and then run your mailmerge.

--
Cheers
macropod
[MVP - Microsoft Word]


"Raza" wrote in message ...
I'm trying to achieve the following via Mail Merge (initiated by MS CRM 4).

We are creating a marketing email that is supposed to have hyperlinks tagged
with the lead id. E.g. http://www.ultralearn.com/default.aspx?leadid=abcd-efgh

Although this is doable but the entire link must be visible as text. If I do
Ctl+K and place the link in there, the mail merge doesn't replace the lead id
merge field. It remains as ?leadid=Lead.

I found a macro-solution. I wrote the macro and yes I can append the field
to the hyperlink.address. But I'm not able to use this document that has the
macro in it, in the mail merge. CRM will not allow me to upload a word doc
with macro. I must send the emails from CRM, so that CRM knows that emails
have been sent to which leads.

Another issue is that I want to place an image in the mail that pulls
dynamically from a website. E.g. img
src="http://www.ultralearn.com/abcd.gif" /

In other words, when a recepient opens their email, the image should load
from the http location and not embedded in the word doc itself.

I am unable to find a place to insert such an html.

Please advise.

Thanks



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Hyperlinks and html images in mailmerge

Unfortunately I don't have CRM 4 or know anything about how it is structured
so cannot tell you whether there is any workaround for the "upload document
with macro" issue.

I don't know what macro code you are using to fix the hyperlinks (does it
use Word's Mailmerge events?) but the code does not necessarily have to be
in the document you want to send. As long as you write your code correctly,
it should be possible to put the code in (say) your normal.dot/normal.dotm,
or (preferably) in another .dot(m) that you load as an Addin. However, I
haven't tested that here so cannot be sure.


Another issue is that I want to place an image in the mail that pulls
dynamically from a website. E.g. img
src="http://www.ultralearn.com/abcd.gif" /

In other words, when a recepient opens their email, the image should load
from the http location and not embedded in the word doc itself.


I'm assuming that you are trying to get the recipient client e-mail to load
the image automatically using the URL you provide, i.e. you're not just
providing a hyperlink that the recipient has to click. i.e. when you look at
the email you're about to send, it has the image, but it's a link to a URL.

Precisely what Word mailmerge can do on this front depends partly on which
versions of Word and Outlook you have, and then some. In other words, some
people seem to have been able to do this in some versions of Word. The last
time I looked was I think with Office 2003, in which I was able to do this
by
a. inserting a nested field such as

{ QUOTE { INCLUDEPICTURE "the URL of the picture" \d } }

/and/

b. unchecking Outlook 2003's Tools-Options-Mail Options-HTML
options-include a copy of the picture rather than a link to the picture
option (I forget the precise wording).

If you leave that option checked, Outlook (or something) generates an
internal CID: reference to an internal MIME part. However, the other person
who tried this could not get the CID: reference to disappear when they
unchecked this option.

Further, the option has disappeared anyway in Outlook 2007. Whether that's
because it was regarded as a security risk, something that people didn't
think they needed any more, or what, I cannot tell you.

Personally, if I were a CRM user, I'd probably contact my MS Account Manager
and ask them whether they know of a way to do it, and perhaps why such
simple stuff is so hard to do.


--
Peter Jamieson
http://tips.pjmsn.me.uk

"Raza" wrote in message
...
I'm trying to achieve the following via Mail Merge (initiated by MS CRM
4).

We are creating a marketing email that is supposed to have hyperlinks
tagged
with the lead id. E.g.
http://www.ultralearn.com/default.aspx?leadid=abcd-efgh

Although this is doable but the entire link must be visible as text. If I
do
Ctl+K and place the link in there, the mail merge doesn't replace the lead
id
merge field. It remains as ?leadid=Lead.

I found a macro-solution. I wrote the macro and yes I can append the field
to the hyperlink.address. But I'm not able to use this document that has
the
macro in it, in the mail merge. CRM will not allow me to upload a word doc
with macro. I must send the emails from CRM, so that CRM knows that emails
have been sent to which leads.

Another issue is that I want to place an image in the mail that pulls
dynamically from a website. E.g. img
src="http://www.ultralearn.com/abcd.gif" /

In other words, when a recepient opens their email, the image should load
from the http location and not embedded in the word doc itself.

I am unable to find a place to insert such an html.

Please advise.

Thanks



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
rraazz rraazz is offline
external usenet poster
 
Posts: 1
Default Hyperlinks and html images in mailmerge

On Sep 9, 1:16*pm, "macropod" wrote:
Hi Raza,

You could solve both problems by embedding the mergefield and whatever associated path information you have in a HYPERLINK field.
For example, if the hyperlink path is:
http: //www.ultralearn.com/default.aspx?leadid=«Lead»
you could select all of that and press Ctrl-F9 to embed the string in another field, thus:
{ http: //www.ultralearn.com/default.aspx?leadid=«Lead» }
which you could then edit to read:
{HYPERLINK "http: //www.ultralearn.com/default.aspx?leadid=«Lead»"}
and then run your mailmerge.

--
Cheers
macropod
[MVP - Microsoft Word]


Hi macropod,

Thanks for the tip. Another colleague of mine gave me the same and it
did the trick. In other words, doing ALT F9 and inserting fields the
way you have mentioned is the answer.

But, there is one issue! Once you save save the doc as xml (required
for importing into CRM as template), and reopen it, same issue: no
fields there. I opened the xml in notepad and tried to force-insert
Lead but doesn't work. It looks like the xml structure won't allow
embedding a MERGEFIELD within a hyperlink. So for now, we'll rely on
copy-paste technology to send out mail merge... unless you can suggest
something here too!

Regards
Raza

  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Hyperlinks and html images in mailmerge


fields there. I opened the xml in notepad and tried to force-insert
Lead but doesn't work. It looks like the xml structure won't allow
embedding a MERGEFIELD within a hyperlink.


It's a bit difficult to explain this, but...

This wouldn't be enough anyway because even if this XML format can encode a
mergefield within a hyperlink, you need the XML equivalent of the MERGEFIELD
field code { MERGEFIELD Lead }, not the "visible" version Lead.

I have had a look at this and the problem seems to be that whenever Word
saves in /any/ XML type format (i.e. .docx, .xml (Word 2007 version), and
probably .xml (Word 2003 version), and probably .docm, it actually encodes a
HYPERLINK field as a "simple" HYPERLINK field, which means that the thing it
refers to is encoded in a Relationship, and the target of that relationship
can, as far as I can tell, only be a piece of plain text such as
http://whatever. You may be able to see this by looking inside the .xml
file. So when you save, close, and re-open the file, the field codes nested
inside the HYPERLINK disappear and are replaced by their results.

However, you /may/ be able to fix this by forcing Word to use the other
method it has of XML-encoding nested fields, which basically encodes all the
characters in the fields including the start and end braces.

To try this, I suggest you do the following:
a. create a simple document and connect it to your data source.
b. insert the HYPERLINK field and the nested MERGEFIELD field. When you
press F9 you might have something like

{ HYPERLINK "{ MERGEFIELD Lead }" }

Now change "HYPERLINK" to "MERGEFIELD" (yes, I know it doesn't really make
sense!)

Save the document in .xml format. Try re-opening it. The nested fields
should still be there.

Now open it as an XML file, e.g. in notepad, locate the text MERGEFIELD. It
should be in a piece of XML code that looks something like

w:fldChar w:fldCharType="begin"//w:rw:rw:instrText
xml:space="preserve" MERGEFIELD "

change MERGEFIELD to HYPERLINK, save and close the XML file, and try
re-opening it. You should see the HYPERLINK field with the nested MERGEFIELD
field.

On the surface, this works with the 2007 version of the .xml format. If you
have to use the 2003 version, things may be different.

However, I cannot tell whether this will actually /also/ achieve your
objectives and not suffer from unwanted side-effects.


--
Peter Jamieson
http://tips.pjmsn.me.uk

"rraazz" wrote in message
...
On Sep 9, 1:16 pm, "macropod" wrote:
Hi Raza,

You could solve both problems by embedding the mergefield and whatever
associated path information you have in a HYPERLINK field.
For example, if the hyperlink path is:
http: //www.ultralearn.com/default.aspx?leadid=«Lead»
you could select all of that and press Ctrl-F9 to embed the string in
another field, thus:
{ http: //www.ultralearn.com/default.aspx?leadid=«Lead» }
which you could then edit to read:
{HYPERLINK "http: //www.ultralearn.com/default.aspx?leadid=«Lead»"}
and then run your mailmerge.

--
Cheers
macropod
[MVP - Microsoft Word]


Hi macropod,

Thanks for the tip. Another colleague of mine gave me the same and it
did the trick. In other words, doing ALT F9 and inserting fields the
way you have mentioned is the answer.

But, there is one issue! Once you save save the doc as xml (required
for importing into CRM as template), and reopen it, same issue: no
fields there. I opened the xml in notepad and tried to force-insert
Lead but doesn't work. It looks like the xml structure won't allow
embedding a MERGEFIELD within a hyperlink. So for now, we'll rely on
copy-paste technology to send out mail merge... unless you can suggest
something here too!

Regards
Raza

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to link images to an HTML page created [email protected] Microsoft Word Help 4 September 4th 06 01:25 PM
Control Z-Order of text and images in importing HTML documents to Word Shannon Page Layout 1 July 31st 06 05:23 PM
Images shrink in HTML mail merge to email Nigel Davies Mailmerge 5 January 20th 06 03:39 AM
How do I send an HTML email merge with references to images? doesntmind Mailmerge 1 September 29th 05 05:57 AM
Save to HTML is saving images as GIFs instead of JPEGs Jonathan Microsoft Word Help 0 March 2nd 05 02:03 AM


All times are GMT +1. The time now is 02:29 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"