473,378 Members | 1,427 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Word 2000 vs 2003

Hi list,

following code works fine for 2003, but in 2000 i get "Object reference not
set" for line "SaveAs":
Dim oDoc As New Word.Document

Dim opara1 As Word.Paragraph

Dim oword As New Word.Application

oword.Visible = True

oword.Options.TabIndentKey = False

oword.CommandBars("Mail Merge").Visible = False

For i = 1 To 3

oDoc = oword.Documents.Add()

opara1 = oDoc.Content.Paragraphs.Add

opara1.Range.Text = "Dikke leendert"

opara1.Range.Font.Bold = True

opara1.Range.InsertParagraphAfter()
Next

Dim oDc As Word.Document

i = 0

For Each oDc In oword.Documents

i += 1

oDc.SaveAs("c:\d" & i & ".doc") 'Works fine in 2003, not in 2000

Next

''When I try to do the following in the for...next, same problem

odc.activate

oword.activedocument.SaveAs("c:\..") same problem...

Hopefully someone can help..

Thanks,

Albert
Jul 21 '05 #1
0 1164

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ken | last post by:
Hi, I'm trying to access the values of properties -- summary and custom without opening Word to do a cleanup op but the customer i'm doing it for only has Office 2000. I'm using c# in .net 2003...
12
by: Cheval | last post by:
Has anyone had any problems with inter-office automation between MS Word and MS Access in Office 2003? I have recently installed office 2003 in a new folder and have left the older office 2000...
5
by: Jerry Hull | last post by:
I'm working with a database developed by an untrained person over several years - and on a network that has recently been upgraded with a new server installed and MS office upgraded from 2K (I...
10
by: Neil | last post by:
An article at http://news.com.com/2100-1012-991694.html?tag=fd_top states: "XML would allow easier interchange of data generated in Office documents with back-end systems or existing Web...
0
by: ViperDK \(Daniel K.\) | last post by:
how can i use interop with word so i can run all word versions from 2000 *and* use the features of 2003. it seems not to work to add a reference to word2000 & 2003 at a time in a project. would i...
0
by: Albert | last post by:
Hi list, following code works fine for 2003, but in 2000 i get "Object reference not set" for line "SaveAs": Dim oDoc As New Word.Document Dim opara1 As Word.Paragraph Dim oword As New...
7
by: Dave | last post by:
Apologies for the newbie question. I have created a vb.net program for my company that is designed to work with Word Templates (about forty of them that we commonly use) that are selected by the...
1
by: kwilder | last post by:
Like many other developers I've written a VB.Net app to automate Word 2000. The app does work on my machine, but when I create an Installation package and install it on other users machines, it...
4
by: Lyle Fairfield | last post by:
I asked this question in Microsoft.Public.Word two days ago but I have not received an answer. I believe there are Office Experts here who may be able to help. --------- "A friend has Office...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.