Solved

Ways of accessing existing Word documents

Posted on 2004-10-13
3
224 Views
Last Modified: 2010-04-23
Is there any other way of getting access to existing  Word documents without creating a new Word document as reference to it?

I am trying to edit the properties in Word from VB.NET

I have the filnenames stored in a String array in one module, and was wondering if i could edit the properties with these filenames without creating a Word document

Example code: Public arrStringPath() As String
                      Dim i As Integer  'index for arrStringPath
                      Dim document As String

                      arrStringPath(i) = document      'document = "D:\Jones\test1\test2\test3\test00111.doc" on first loop

I then have another module that uses this array of filenames, is there anything else i can do to access the Word document properties apart from the following.............

Example code: Dim actDoc As Word.Document
                      Dim wordApp As New Word.Application
                      Dim intFileCount As Integer         'index for public arrStringPath
                         

                     actDoc = wordApp.Documents.Open(arrStringPath(intFileCount))

I have recently posted a question("Opening a current Word document with filename in array") about this not working and would appreciate knowing if there is any way around it, thanks in advance.


0
Comment
Question by:dev-ngps7
3 Comments
 
LVL 28

Accepted Solution

by:
iboutchkine earned 500 total points
ID: 12297665
>>Is there any other way of getting access to existing  Word documents without creating a new Word document as reference to it?

When you want to open an existing Word document, you are not creating a new document, you are creating a new object adn there is no way around it. Unless you open word as a text or binary file.
0
 
LVL 27

Expert Comment

by:planocz
ID: 12299100
Word document properties ?

What Word document properties are you wanting to change?
or Do you want to replace a text string or field in the word doc?
0
 
LVL 55

Expert Comment

by:Julian Hansen
ID: 12317533
with reference to thread http://www.experts-exchange.com/Programming/Q_21160867.html#12317443

Just a point - the questions asked in the two threads are different. In this thread you are asking about solving an error you have been receiving and you received answers to those (that you did not respond to).

In the other thread you are asking something completely different i.e. how to access a Word Document without creating a Word Object - and you received answers to that to - basically you can't.

In neither of the threads have you provided any feedback to the questions posted. If you people to assit you you need to assit them by providing the right information and feedback to posts.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question