OLE Word Objects -
I am just stating with OLE, and I’m weak on objects. First a bit of background, then questions.
My first two OLE attempts have had some success.
My first attempt was to control MS Word 95 with my VB6 on WMe. It turns out that I can’t use MS Word 95 this way as it does not exist in the VB’s references, so using code like:
Public objApp as New Word.application
Public objDoc as Object
does not work -- the Word.appliation does not exist, so code like
objapp.visible=true
and
objdoc.content = "My first OLE"
does not work.
For attempt two, I duplicated a little program from "How to use the Spelling Corrector tool of MS Word within VB" on the VBWorld site
http://216.26.168.92/tips/tip81.html (nice and simple). It works with older MS Words. The sequence of operations:
Create Word Object { Set Word = CreateObject("Word.Basic") }
Show Word
Word New file
Insert text into Word from VB text box
Start Word Spell checker
Word Edit Select All
Then grab the selection and put in into a VB text box.
Almost works. It works if I take out the call to the spell checker. The spell checker creates an error 51 which just says the spell checker is done. On Error Resume Next does not help -- although the code runs, nothing is output after starting the spell checker. I’m sure the whole problem is my trying to use the old Word95, but it is what I have.
QUESTIONS:
1) Is there a way I can deal with the error caused by the spell checker indicating it is done, so I can use the spell checker?
2) Whereas the {Public objApp as New Word.application} is exposed when I choose the appropriate newer MS Word reference in VB, where do I find out about the {CreateObject("Word.Basic")}? Where did the "Word.Basic" come from? Where do I find out about it and others like it?
3) What is the difference between the two word objects created in the two examples {Public .... word.application vs. Set .... CreateObject("Word.Basic") }?
I realize the answers to the everything afte the first question could be multiple tutorials, but I'm just looking for a hint here, so I can better focus my search. (A tutorial would be good too!)
Thanks.
-Mike-
hiding groups of objects -
How can I hide all objects on a form that meet a certain criteria? Let's say that I have these objects: lblTest1 lblLive1 btnTest2 btnLive2. How can I hide all of the objects that has a name with the word test in it?
I think that I want the VB code for this:
For all objects wit
a couple of questions(word 2003 VB editor) -
i was wondering what version of VB word 2003 has... if this is in the wrong forum i apologize,
also, i'm trying to make a VB window change from a single button to a full form using code, so i'd like to ask how to make some basic objects using code(i don't need to know every type of
Office Objects in C# -
Was looking to find out exactly where I could find the right reference for Word or Excel objects in C#...NET objects, not COM objects.
Thanks (:
Forms in Word VB environment -
Hi guys! I am glad to join you and this is my first question in this forum. I want ToolTips feature for the ActiveX objects, such as lables, on the MS Word document, but MS take them off from the properties. So I have to build my own Tooltips using a UserForm. But MS also take the hWnd
application objects -
Are application objects, such as Access or Word objects installed with VB6 even if those apps don't exist on the installed computer? Also, if I create an app that uses an Access or Word object, and I distribute it, does that object get distributed with my application? Will it work ev
Open objects displayed as icons -
Hi,
I have a Word document with Word/Excel objects in it that are displayed as icons.
I would like to display those objects in the document and not as icons.
Is there anyway I can do it with code?
thanks
MS word objects -
could anyone help me with this? im making a MS Word addin and need to know a few things:
1) what is the name of the actual MS Word text thingy that the user writes into?
2) what is the easiest VB code way to add another item to the menu (with all the drop down stuff aswell)
Please Help with MS Word VBA problem: Inserting ActiveX. -
Hello to all Forum members,
I've a very small query but not finding answer on my own. So, I request you all to please help me to get answer.
I'm working on a project in which I have developed an ActiveX control in Visual Basic 6.0. This is a general purpose ActiveX control which
Strange Word Problem using compiled DLL -
Hey all,
I'm having an unusual problem I was hoping someone here had come across before. I'm using an ActiveX DLL to create and save a Word document from an ASP page. When I leave my DLL running within the VB environment and initiate the routine, everything works fine and the file i
How do VB for Word, Excel and/or VBScript work together -
I need help understanding how object models interact with each other. If I open Excel using VBScript or VB in Word, how do I know what objects and methods are available to me?
Should I be able to use any and all of the Excel methods in VBScript/Word once I create an Excel object (un
Selecting ALL text in word doc... -
Ok, I load a word doc in VB using the Word objects...how to I get ALL the text and paste it into a standard textbox???
Woka
quick word automation question -
I wrote this app that uses some word automation and it works fine on my PC but not on another PC
My PC has office 2k3 while the other has office XP so I am sure the problem is there because I have a reference to Word 11 (2k3)
Now the automation I am using doesn't use anything in
Word Report(Word Wrap) CR11 -
Right now i have copied my word document with word wrap into crystal reports. The only problem is how am i going to designate the word wrap?
Is there anyway that CR11 can convert the word document to a .rpt and include the data fields I inserted. The only way i can make the report a
Using Word to Mailmerge in VB 6 -
Hi All,
I want to use VB6 to mailmerge, but can't find much help on the matter. There seems to be different ways to declare word and document objects. I have noticed that you can declare a word object as follows:-
Dim wrdApp As Word.Application, wrdDoc As Word.Document, wrdMerge
Problems manipulating Word Objects in code. -
Guys and girls,
I am trying to manipulate Word documents using Visual Basic code.
I've been able to pretty much do everything I've needed, apart from insert newlines!
I'm using the Word Objects:
Dim WdApp As Word.Application
Dim Wd as Word.Document
....etc...
I am pr
Imbed a Word Document On a Form. -
I am trying to set up a form with an MS-Word Document. The word document will be on the form and not a stand-alone application. To set this up I selected components, then insertable objects, and added a Microsoft Word Document. Now I added the new object to the form. I also have s
need help with word objects -
I'm not sure what your question is about the Word object but I bet it has something to do with the fact that you can't type. Plug your keyboard in and try to code that way. It works a lot better.
Scrolling controls -
I've been trying to find some reference to this here, but nothing has popped up so far. Surely someone has tried this before.
I'd like to be able to scroll the contents of a form (or frame on a form) up or down so that more data can be displayed. By using a scroll bar to change the
OLE Word Objects -
I am just stating with OLE, and I’m weak on objects. First a bit of background, then questions.
My first two OLE attempts have had some success.
My first attempt was to control MS Word 95 with my VB6 on WMe. It turns out that I can’t use MS Word 95 this way as it does no
How to copy a chart from Excell to Word -
Ok this may be a simple question but I’m struggling like crazy to figure it out.
I want to use two ole objects in vb (one excel chart and one word document). The goal is to make a chart (from data calculated in vb) and then copy the chart as a windows metafile into word. Then mak
save find all to array (word vba) -
I want to search a word document for all instances of a certain word, for example "hello" and save the results of the search as an array of .range objects. I've done it in other app but can't get it to work in ms word.
[word]How to remove the embed objects in the documents -
Hai,
I was wondering if anyone can help.
how to remove the embedded objects present in the document......
Thanks in advance
Creating word documents in asp.net *RESOLVED* -
I'm trying to create and write a word document within asp.net using:
Code:
Word.ApplicationClass WordApp = new Word.ApplicationClass();
Does anyone know of a reference for all the objects I can use in word?
DJ
VB with Word -
I am creating word document from vb using objects:
Dim Wrd as object
set wrd = createObject("word.basic")
wrd.fileNew
' and now I need to setup page parameters like TopMargin
'and others:
wrd.FilePageSetup TopMargin = 1.5 '??? this syntax is wrong, I
finding # of pages in a word file -
I need to find the number of pages in a word file but here is the trick.
I am not opening the file through the open statement.
I am using WORD objects. anyone know of any commands that could be used to make this happen?
thansk
Doug
MS Word Hanging On -
I use word to generate a letter within a VB 6 app. It's worked great for years, but now I find the need to delete the letter from the file system after it has been generated and saved to disk from within my app. When I try to delete, it says Word still has it busy. I have tried sett
Incorporating Word functionality in a Memo box -
Is there any way I can get Word's functionality in a memo box?
My project contains a number of memo boxes. My users are complaining that they would rather use Word for these items. They want the full editing functionality of Word.
I thought of using OLE objects in my Crystal Re
Combo Word / Outlook App -
Hi,
Quick Background: I'm developing a program that has 5 text fields:
The first, second, and third are not an issue (a date, a name, and another name). The fourth and fifth however...
1.) I'd like to add formatting capability to these two fields (Word Functionality, ie. Bold, I
Opening Word document in database -
I am using VB6 and Access 97. I have a table in Access that contains
Word Documents as OLE Objects. What I want to do is click on a button in my VB project and this will open the relevant Word document from the table and I am pretty clueless about how to do this. Any help would be a
Word Objects into a DataSet -
I know you guys hate complicated questions, but I figured I'd go to the experts:
I want to store a large number of indexed word documents.
I'm planning on storing them in an access database as OLE Objects.
My problem is that I can't load the OLE Objects from the Access databas
Deploying Access applications on Citrix servers, using Word/Excel .olbs -
I'm trying to deploy an Access 2000 mde file on a Citrix server. The application uses the Word and Excel olb's. I deploy my application with the Access 2000 runtime, which (under normal circumstances, function correctly). The system works fine until it hits a section of the code that u
objects -
this thread has nothing to do with vb in particular
i once had an argument with my class mate over the topic of objects ,when he started talking abt null objects.
i tried to explain it to him that null objects cant exist as objects are defined as instance of a class.(by null obje
Assign a string to Word object to print -
Hi,
can anyone let me know how to print a string using the word application object model.
I think it should be simple but don't know the correct objects to use. Put simply I have a string which I want to print from VB, via MS word without showing the word application.
Thanks
Using Word 2000/2002 with VB -
Hello,
I have developed and distributed in all our offices a sort of survey application that launches and uses Word 97 to print a rather complicated document (+/- 20 pages with pictures, tables etc..., word is entirely hidden during the process).
The app uses mainly WordBasic co
Can Report take many ole objects -
by that i mean.
If P.E. i have a word object at details and when i change the parameters then a completely different word object is displayed (or added below the other document). Can subreports help to do it?
Any thought?
microsoft word automation through vb 6 -
I want to create a document in microsoft word 2003 using vb 6.
The document will consist mainly of information from an access database.
The general form of the report will be a table that shows Trip names, trip dates, passenger names for each trip and so on.
Does anyone have
MS Word VB Macro -
I am building a Macro for Word, so I need to know how to go to a specific line postion and write text. There are soooo many objects/properties/functions I get lost everytime I try.
MS Word In Visual Basic Inquiry -
Do you need to have MS Office installed on your computer to create MS Word objects in your VB code??
If not, what references, and/or components are needed to do this?
Any sample code will help.
Thanks
RichTextBox:How do I turn a word to any angle I wantSuch as turning it upsidedown -
I am making a Corel-Draw like program, which are able to support
foreign languages, such as Mandarin**Chinese**
I wanna make like this:
I can make 2 circles with one inter and exter(got me?)
Now, I want to insert words inside the ring and go along the
circle...***
The questions a
VB to Word-Labels -
Hi,
I am attempting to take certain information from an access database to Microsoft Words labels.
I know about creating word objects etc. I don't know how to create pages of labels via VB.
I will extract the information from the database and manipulate it. I then want to put