Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
garethjwelsh garethjwelsh is offline
external usenet poster
 
Posts: 2
Default MailMerge Datasource not appearing in VBA when using DDE

Hi,
i am attempting to do a mailmerge. The main file that i am using has got a
data source setup correctly, when i open the file it correctly has a dialogue
box stating that this file needs to run a select statement and it is
selecting it from the correct source.

The problem is when i use the same file in a system when the correct file is
opened it doesn't have a datasource assigned to it. It is exactly the same
file as i have checked this already, but for some reason the datasource is
not accesible in VBA. I have used dde for communication in the system.

I was just wondering if anyone had any idea why the data source does not
appear attached to the Word 2003 file in VBA, i thought i might have opened
it in a strange way. Interestingly exactly the same code works perfectly on
someone elses computer so there must be some difference between my version of
word/windows or soemthing that causes the file to behave in this way.

Any help greatly appreciated.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default MailMerge Datasource not appearing in VBA when using DDE

Word's behaviour in this area is significantly affected by a registry
setting - see

http://support.microsoft.com/kb/825765/en-us

for some further info. In particular, attempts to connect using code will
probably fail if you do not set this registry entry.

If following that article does not fix things for you, could you try to
clarify what you meant he

but for some reason the datasource is
not accesible in VBA. I have used dde for communication in the system.


Peter Jamieson

"garethjwelsh" wrote in message
...
Hi,
i am attempting to do a mailmerge. The main file that i am using has got a
data source setup correctly, when i open the file it correctly has a
dialogue
box stating that this file needs to run a select statement and it is
selecting it from the correct source.

The problem is when i use the same file in a system when the correct file
is
opened it doesn't have a datasource assigned to it. It is exactly the same
file as i have checked this already, but for some reason the datasource is
not accesible in VBA. I have used dde for communication in the system.

I was just wondering if anyone had any idea why the data source does not
appear attached to the Word 2003 file in VBA, i thought i might have
opened
it in a strange way. Interestingly exactly the same code works perfectly
on
someone elses computer so there must be some difference between my version
of
word/windows or soemthing that causes the file to behave in this way.

Any help greatly appreciated.



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
garethjwelsh garethjwelsh is offline
external usenet poster
 
Posts: 2
Default MailMerge Datasource not appearing in VBA when using DDE

Fantastic!! Thanks for your help Peter, it is greatly appreciated!!!

That works as a workaround, perhaps my talk of using DDE was a red herring,
i assumed it had something to do with the communication, but apparently it
was just XP security settings.

Does anyone know exactly why XP behaves in this way? or if any other
security settings affect this behaviour. It is just as i previously stated
someone who has the same setup on his PC, same version of XP and Word etc was
able to print using MailMerge correctly without the need to setup this
registry key. I was just curious if other people found any XP settings
affected the behaviour of word in mailMerge.

The possible security hole that this leaves might not be an acceptable
solution for our clients, so i was hoping there might another way of fixing
it, i know it can work on Windows XP, i just don't know how!!!


"Peter Jamieson" wrote:

Word's behaviour in this area is significantly affected by a registry
setting - see

http://support.microsoft.com/kb/825765/en-us

for some further info. In particular, attempts to connect using code will
probably fail if you do not set this registry entry.

If following that article does not fix things for you, could you try to
clarify what you meant he

but for some reason the datasource is
not accesible in VBA. I have used dde for communication in the system.


Peter Jamieson

"garethjwelsh" wrote in message
...
Hi,
i am attempting to do a mailmerge. The main file that i am using has got a
data source setup correctly, when i open the file it correctly has a
dialogue
box stating that this file needs to run a select statement and it is
selecting it from the correct source.

The problem is when i use the same file in a system when the correct file
is
opened it doesn't have a datasource assigned to it. It is exactly the same
file as i have checked this already, but for some reason the datasource is
not accesible in VBA. I have used dde for communication in the system.

I was just wondering if anyone had any idea why the data source does not
appear attached to the Word 2003 file in VBA, i thought i might have
opened
it in a strange way. Interestingly exactly the same code works perfectly
on
someone elses computer so there must be some difference between my version
of
word/windows or soemthing that causes the file to behave in this way.

Any help greatly appreciated.




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default MailMerge Datasource not appearing in VBA when using DDE

Does anyone know exactly why XP behaves in this way?

The article I mentioned gives some indication of the type of problem the
registry fix is designed to prevent - when Word opens a data source, it is
executing non-Word code and potentially non-Microsoft code, any of which
might have nasty side effects. When Word opens a data source, it can
a. execute its own DDE code to go and get data from Excel or Access. In
that case, Excel/Access code and macros may execute, and Access queries can
also invoke Access VBA functions which can do pretty much anything.
b. execute ODBC driver code, OLEDB provider code, or text converter code,
any of which could be provided by a third party. For example, I wrote a
"text converter" a while ago that can invoke user-authored Word VBA code.

or if any other
security settings affect this behaviour. It is just as i previously stated
someone who has the same setup on his PC, same version of XP and Word etc
was
able to print using MailMerge correctly without the need to setup this
registry key.


That's interesting, but unfortunately I have no idea what else might
influence this particular "security feature" if your user has /exactly/ the
same version of Word (some earlier releases of Word XP worked differently).
I suppose if I was going to have a closer look, I'd start by looking at
a. whether Word macro security settings had any impact
b. whether the security settings related to the document, its template, the
data source, associated code had any impact, e.g. what if the Mail Merge
Main document is read-only, what if the data source is/is not located in a
trusted Internet zone, etc. etc.

I don't see why either of those things would make any logical difference to
what Word /should/ do, but there you go.

Peter Jamieson

"garethjwelsh" wrote in message
...
Fantastic!! Thanks for your help Peter, it is greatly appreciated!!!

That works as a workaround, perhaps my talk of using DDE was a red
herring,
i assumed it had something to do with the communication, but apparently it
was just XP security settings.

Does anyone know exactly why XP behaves in this way? or if any other
security settings affect this behaviour. It is just as i previously stated
someone who has the same setup on his PC, same version of XP and Word etc
was
able to print using MailMerge correctly without the need to setup this
registry key. I was just curious if other people found any XP settings
affected the behaviour of word in mailMerge.

The possible security hole that this leaves might not be an acceptable
solution for our clients, so i was hoping there might another way of
fixing
it, i know it can work on Windows XP, i just don't know how!!!


"Peter Jamieson" wrote:

Word's behaviour in this area is significantly affected by a registry
setting - see

http://support.microsoft.com/kb/825765/en-us

for some further info. In particular, attempts to connect using code will
probably fail if you do not set this registry entry.

If following that article does not fix things for you, could you try to
clarify what you meant he

but for some reason the datasource is
not accesible in VBA. I have used dde for communication in the system.


Peter Jamieson

"garethjwelsh" wrote in message
...
Hi,
i am attempting to do a mailmerge. The main file that i am using has
got a
data source setup correctly, when i open the file it correctly has a
dialogue
box stating that this file needs to run a select statement and it is
selecting it from the correct source.

The problem is when i use the same file in a system when the correct
file
is
opened it doesn't have a datasource assigned to it. It is exactly the
same
file as i have checked this already, but for some reason the datasource
is
not accesible in VBA. I have used dde for communication in the system.

I was just wondering if anyone had any idea why the data source does
not
appear attached to the Word 2003 file in VBA, i thought i might have
opened
it in a strange way. Interestingly exactly the same code works
perfectly
on
someone elses computer so there must be some difference between my
version
of
word/windows or soemthing that causes the file to behave in this way.

Any help greatly appreciated.






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
Using OLE to change mailmerge datasource LuckyLady Mailmerge 2 September 16th 05 12:05 AM
Mailmerge datasource LuckyLady Mailmerge 1 September 2nd 05 06:26 PM
automated mailmerge using Brio/Excel 2.1 datasource files Heidi Mailmerge 1 February 15th 05 12:41 PM
cant open mailmerge datasource saj via OfficeKB.com Mailmerge 0 January 5th 05 03:19 PM
word 97 mailmerge with paradox files as datasource saj via OfficeKB.com Mailmerge 0 December 24th 04 12:14 PM


All times are GMT +1. The time now is 02:52 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"