Results 1 to 3 of 3

Thread: system.windows.documents not working

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2000
    Posts
    117

    system.windows.documents not working

    hi

    i am trying to run an example that i copied from msdn

    this example

    Dim docNew As document

    docNew = Documents.Add

    With docNew.MailMerge
    .MainDocumentType = wdFormLetters
    .OpenDataSource( _
    Name:="C:\Program Files\Microsoft Office" & _
    "\Office\Samples\Northwind.mdb", _
    LinkToSource:=True, AddToRecentFiles:=False, _
    Connection:="TABLE Orders")
    End With

    but i get a error that "document" is not declared
    i tried to import namespace system.windows.documents but i havent got it

    where can i find that namespace?
    thank you
    sharon

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: system.windows.documents not working

    I think you are looking for the Word reference, goto Project->Reference->COM ->Microsoft Word Object x.x

  3. #3
    Addicted Member
    Join Date
    Jan 2005
    Location
    Montréal
    Posts
    160

    Re: system.windows.documents not working

    If you use Office XP or later, you should check out the Primary Interop Assemblies for Office.

    http://www.microsoft.com/downloads/d...displaylang=en
    There are no stupid questions, but a whole bunch of dumb sayings !

    Save time on database code, try DataLG !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width