Solved

Ways of accessing existing Word documents

Posted on 2004-10-13
3
220 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 51

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now