Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Bruce Baker[_2_] Bruce Baker[_2_] is offline
external usenet poster
 
Posts: 1
Default incorporating mailmerge code from vb.net 2008 for Office 2000

Hi

My VB.net app needs to cater for some of my clients who are still using
Office 2000 (some are using Office 2007 though)

We do some basic mail-merge stuff. Open a document, set a few bookmarks,
print it and then move onto the next client.

In VB6, I used to add a reference to msword.olb.

What do I need to do to get it to work - I've tried to add that as a
reference, and then Visual Studio does something magic with the 'interop'
stuff - and more importantly I get an exception when trying to load my
document


oApp.Documents.Open("c:\myDoc.doc", , True)

gives me an exception of


System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.
at Microsoft.Office.Interop.Word.Documents.Open(Objec t& FileName, Object&
ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles, Object&
PasswordDocument, Object& PasswordTemplate, Object& Revert, Object&
WritePasswordDocument, Object& WritePasswordTemplate, Object& Format, Object&
Encoding, Object& Visible, Object& OpenAndRepair, Object& DocumentDirection,
Object& NoEncodingDialog, Object& XMLTransform)

Please help !

thanks
Bruce

--
Bruce
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default incorporating mailmerge code from vb.net 2008 for Office 2000

Broadly speaking I believe the situation is as follows:
- to communicate with Office Apps from .NET, you use IAs (Interop
Assemblies).
- there are different IAs for each different version of Office.
- some IAs known as Primary Interop Assemblies (PIAs) are provided by
Microsoft (only for Office XP and later)
- some features of later versions of Office may work with earlier versions
of the PIAs, but probably not the other way around
- other IAs you probably have to generate yourself
- you also have to distibute the IAs with any solution you develop. Nor do
I know whether there are any licensing issues on that front
- product of a /single/ .NET solution that targets all versions of Office
is, as far as I know, not supported - i.e. you will probably be better off
producing different versions of of the app for Word 2000 and later versions.

And that's really all I know - it may be worth searching msdn.microsoft.com,
the MS downloads site, and Google groups for further info.

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

"Bruce Baker" wrote in message
news
Hi

My VB.net app needs to cater for some of my clients who are still using
Office 2000 (some are using Office 2007 though)

We do some basic mail-merge stuff. Open a document, set a few bookmarks,
print it and then move onto the next client.

In VB6, I used to add a reference to msword.olb.

What do I need to do to get it to work - I've tried to add that as a
reference, and then Visual Studio does something magic with the 'interop'
stuff - and more importantly I get an exception when trying to load my
document


oApp.Documents.Open("c:\myDoc.doc", , True)

gives me an exception of


System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.
at Microsoft.Office.Interop.Word.Documents.Open(Objec t& FileName,
Object&
ConfirmConversions, Object& ReadOnly, Object& AddToRecentFiles, Object&
PasswordDocument, Object& PasswordTemplate, Object& Revert, Object&
WritePasswordDocument, Object& WritePasswordTemplate, Object& Format,
Object&
Encoding, Object& Visible, Object& OpenAndRepair, Object&
DocumentDirection,
Object& NoEncodingDialog, Object& XMLTransform)

Please help !

thanks
Bruce

--
Bruce


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
formatting date mergefield in format "19-01-2008", not "1/19/2008" Peter J. Veger Mailmerge 1 February 4th 08 11:54 PM
Act! 2008 With Office Word 2007 Ed Microsoft Word Help 1 January 2nd 08 08:56 PM
Is it poss. to use office prof 2000 word mailmerge with aol? J Mailmerge 1 March 7th 07 02:32 PM
Can you add the FIM-A code using mailmerge? Railfan Mailmerge 1 December 24th 05 08:19 PM
How do I send a mailmerge out with e-mail in Office 2000? rfstuart8676 Mailmerge 1 June 28th 05 07:04 PM


All times are GMT +1. The time now is 12:41 AM.

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"