Word Automation


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Word Automation

  1. #1
    Join Date
    Nov 2008
    Posts
    10

    Word Automation

    I have an application that creates a word file and then interacts with it through bookmarks. Is there any way to create this file so that the user cannot close it through word? I would like to have the VB program have control over opening and closing the file. Thanks in advance for any assistance.

  2. #2
    Join Date
    Feb 2004
    Location
    Longueuil, Québec
    Posts
    577
    You could set a password on the document.

    I am in working from an hotel room and do not have access Word right now, but I kind of remember that there is a parameter to set the password on the Save and/or SaveAs method of the Word.Document class.

    There is also a parameter to specify the password when reopening the document on the Open method of the Word.Documents collection.

    Only your application and users who know the password (such as yourself), will then be able to use the document.
    Jacques Bourgeois
    JBFI
    http://www3.sympatico.ca/jbfi/homeus.htm

  3. #3
    Join Date
    Nov 2008
    Posts
    10
    Jacques, Thanks for your suggestion. Setting a password sounds like a viable solution.

  4. #4
    Join Date
    Apr 2007
    Location
    Sterling Heights, Michigan
    Posts
    8,666
    Just keep in mind that anyone that knows the password can change the password, so I would suggest always keeping an update to date backup of the document.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Word Automation with ASP
    By Stan Brown in forum ASP.NET
    Replies: 4
    Last Post: 02-13-2010, 08:49 AM
  2. Replies: 6
    Last Post: 09-08-2009, 06:02 PM
  3. Word Automation In ASP
    By Nick Hall in forum ASP.NET
    Replies: 4
    Last Post: 01-23-2003, 10:53 AM
  4. Word Automation Is it possible with ASP
    By David in forum ASP.NET
    Replies: 0
    Last Post: 08-26-2002, 08:16 AM
  5. word automation
    By adam in forum ASP.NET
    Replies: 2
    Last Post: 07-05-2001, 03:10 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center