473,322 Members | 1,911 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,322 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 1162

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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.