> I was wrong about the valid data. The data from the
> record under the one in question is what appears as data.
[quoted text clipped - 29 lines]
> >Do I need to tell you this has been driving me nuts!
> >.
For a deeper understanding I offer the macro code
developed to create such code:
Sub pc_hard()
'
' pc_hard Macro
' Macro updated 1/15/2004 by Stephen W. Gangey
'
ActiveDocument.MailMerge.MainDocumentType = wdCatalog
ActiveDocument.MailMerge.OpenDataSource Name:= _
"S:\GangeyAssoc\sitemap_files\AS.xls",
ConfirmConversions:=False, _
ReadOnly:=False, LinkToSource:=True,
AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="",
WritePasswordDocument:="", _
WritePasswordTemplate:="", Revert:=False,
Format:=wdOpenFormatAuto, _
Connection:="catalog", SQLStatement:="",
SQLStatement1:=""
ActiveDocument.MailMerge.EditMainDocument
ActiveDocument.MailMerge.Fields.Add
Range:=Selection.Range, Name:= _
"merchant"
Selection.TypeParagraph
ActiveDocument.MailMerge.Fields.Add
Range:=Selection.Range, Name:= _
"pc_hardhtm"
Selection.TypeParagraph
Selection.TypeParagraph
ActiveDocument.MailMerge.DataSource.QueryString = _
"SELECT * FROM S:\GangeyAssoc\sitemap_files\AS.xls
WHERE ((pc_hardhtm IS NOT NULL ))" _
& ""
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
ChangeFileOpenDirectory "S:\GangeyAssoc\lw \"
ActiveDocument.SaveAs FileName:="pc-hard.txt",
FileFormat:=wdFormatText, _
LockComments:=False, Password:="",
AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False,
EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False,
SaveFormsData:=False, SaveAsAOCELetter:= _
False
and to look at the proposed result you will need to surf
to www.mall-at-gangey.com then select computers from the
category list and then hardware. Amazon.com is the one
that keeps getting skipped over!
>-----Original Message-----
>Do you have any double-quote characters in your data, in or near the
[quoted text clipped - 48 lines]
>
>.
Peter Jamieson - 16 Jan 2004 16:21 GMT
> and to look at the proposed result you will need to surf
> to www.mall-at-gangey.com then select computers from the
> category list and then hardware. Amazon.com is the one
> that keeps getting skipped over!
Unfortunately it was impossible to tell from this site exactly what data you
have in the cell that is causing problems. Is it the target URL, the entrie
string for the entry, or what? The only thing I did notice is that the URL
for the image in the Amazon entry is a relative pathname starting with ../
whereas all the other ones start with http: etc.
--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/
> For a deeper understanding I offer the macro code
> developed to create such code:
[quoted text clipped - 122 lines]
> >
> >.
Steve Gangey - 16 Jan 2004 20:05 GMT
Sample of these files are on my website at:
www.gangey.co/WordProb. Use the saveas function to put
them in the same location and you will be able to
duplicate the scenario.
In this particular file these are the variables and
locations:
Row #21 Col C (merchant) Col BP (pc_hardhtm)
merchant = <!--Amazon.com-->
pc_hardhtm = <a
href="http://www.amazon.com/exec/obidos/redirect?
tag=stephenwgange-20&path=tg/browse/-/541966/"
target="_blank"><img
src="../amazon/images/pcpho120x60.gif" border="0"
width="120" height="60"></a>
Row #51 Col C (merchant) Col BP (pc_hardhtm)
merchant = <!--Buy.com-->
pc_hardhtm = <a href="http://click.linksynergy.com/fs-
bin/click?
id=*VbPTXVcYJ4&offerid=56785.10000394&type=4&subid=0"
target="_blank"><IMG width="234" height="60" alt="We have
it all right here!" border="0"
src="http://ak.buy.com/buy_assets/affiliate/01/0100_005B.gi
f"></a><IMG border="0" width="1" height="1"
src="http://ad.linksynergy.com/fs-bin/show?
id=*VbPTXVcYJ4&bids=56785.10000394&type=4&subid=0">
In books, music, movies, and a couple of other places I
have a virtual store on my site that they are directed to
and those begin with "../amazon...."
>-----Original Message-----
>> and to look at the proposed result you will need to surf
[quoted text clipped - 139 lines]
>
>.
Peter Jamieson - 17 Jan 2004 06:29 GMT
The problem is a missing double quote in the fo_winehtm column on the
Amazon.com row (you have 'target=:_blank"', and 'target=:"_blank"' makes it
work).
Connection via DDE is particularly sensitive to double quotes because this
connection method tends to treat them as text delimiters (despite the fact
that the real delimiters should obviously be the cell boundaries). So, e.g.
columns containing old-style feet/inches data such as 6' 4" can cause
problems. Matching them up - which is probably the correct thing for your
data anyway - seems to solve the problem but personally I would regard that
as shaky enough to want to do things another way if possible.
I did try connecting via ODBC (check the select method box in the Open Data
Source dialog box and choose the ODBC option when presented) and that also
seemed to fix the problem (whether or not I fixed the double quote problem).
However, you would need to test that more thoroughly.
--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/
> Sample of these files are on my website at:
> www.gangey.co/WordProb. Use the saveas function to put
[quoted text clipped - 189 lines]
> >
> >.
Steve Gangey - 17 Jan 2004 09:10 GMT
It seems to work.... Thanks! I wish I knew how! Well
maybe not. Ignorace can be bliss at times!
>-----Original Message-----
>The problem is a missing double quote in the fo_winehtm column on the
[quoted text clipped - 41 lines]
>> target="_blank"><IMG width="234" height="60" alt="We have
>> it all right here!" border="0"
src="http://ak.buy.com/buy_assets/affiliate/01/0100_005B.gi
>> f"></a><IMG border="0" width="1" height="1"
>> src="http://ad.linksynergy.com/fs-bin/show?
[quoted text clipped - 167 lines]
>
>.