473,396 Members | 1,995 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,396 software developers and data experts.

properties and methods of OLE

553 512MB
epots9 ,

i was wondering how would we find out properties and methods of OLE code.

For example, i have a code in VBA that opens a word document and writes some text.

Expand|Select|Wrap|Line Numbers
  1. Set oWord = CreateObject("word.application")
  2.  Set oDoc = oWord.Documents.Add()
  3.  'Add text to the document.
  4.  oWord.Selection.TypeText "This is a test.  "
  5.  
This code piece uses two methods .Documents and .TypeText . These 2 i have found from the internet but image using these Word and other applications, you may need 100s of different methods and properties; and in the programming languge you use, you will not find these properties/methods even in the help or library document.

How to get list of these for different applications i.e word, excel, IE, etc

Also, i was wondering how would i open windows Calculator "calc.exe" . I have tried Set oObj = CreateObject("calculator.application") - but this doesn't work.

Thanks#

I think is what OLE is.
Aug 14 '07 #1
2 2453
bartonc
6,596 Expert 4TB
epots9 ,

i was wondering how would we find out properties and methods of OLE code.

For example, i have a code in VBA that opens a word document and writes some text.

Expand|Select|Wrap|Line Numbers
  1. Set oWord = CreateObject("word.application")
  2.  Set oDoc = oWord.Documents.Add()
  3.  'Add text to the document.
  4.  oWord.Selection.TypeText "This is a test.  "
  5.  
This code piece uses two methods .Documents and .TypeText . These 2 i have found from the internet but image using these Word and other applications, you may need 100s of different methods and properties; and in the programming languge you use, you will not find these properties/methods even in the help or library document.

How to get list of these for different applications i.e word, excel, IE, etc

Also, i was wondering how would i open windows Calculator "calc.exe" . I have tried Set oObj = CreateObject("calculator.application") - but this doesn't work.

Thanks#
Word Object Model Reference

I don't know if your SDK comes with OLE/COM Object Viewer. In VS2005 it in ...PSDK...|Tools.
Aug 14 '07 #2
JKing
1,206 Expert 1GB

Also, i was wondering how would i open windows Calculator "calc.exe" . I have tried Set oObj = CreateObject("calculator.application") - but this doesn't work.

Thanks#
This is straight from the windows help file for the shell command in VBA.

Shell Function Example
This example uses the Shell function to run an application specified by the user. On the MacIntosh, the default drive name is “HD” and portions of the pathname are separated by colons instead of backslashes. Similarly, you would specify Macintosh folders instead of \Windows.
Expand|Select|Wrap|Line Numbers
  1. ' Specifying 1 as the second argument opens the application in 
  2. ' normal size and gives it the focus.
  3. Dim RetVal
  4. RetVal = Shell("C:\WINDOWS\CALC.EXE", 1)    ' Run Calculator.
  5.  
Though the path may differ slightly and perhaps be "C:\WINDOWS\SYSTEM32\CALC.EXE"
Aug 14 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: ytrewq | last post by:
Should dynamic ("expando") properties be restricted to native and user-defined objects? Or should host objects - such as references to the browser or a plug-in or to the document and its elements -...
23
by: Marcin Grzębski | last post by:
I red MSDN article of C# 2.0 this week... and i found very strange syntax for properties e.g.: public int MyIntValue { get { // ... } protected set { // ... }
3
by: Martin Montgomery | last post by:
I have, for example, a property called myProperty. I would like, when using a property grid to display the property name as "My Property". Is this possible. Is there an attribute etc Thank ...
3
by: Sam Sungshik Kong | last post by:
Hello! While using panel control, I wondered a thing. Panel class is subclass of Control class. Control class has KeyPress event and Focus() method, etc... Then Panel class must have them. I...
0
by: george_Martinho | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older than a...
0
by: Giorgio | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older...
1
by: erik | last post by:
Hi! Is it possible to expose customer properties used in a class in a web servies. Can I use on a property or how do I do? The thing is that I do not want to use parameters for the method I have...
17
by: Bruce One | last post by:
Lets consider a class called Currency. This class must be the responsible for taking care of all calculations over currency exchanges, in such a way that I pass values in Euros and it returns the...
39
by: Paul Mcilreavy | last post by:
Hi, i would like to get some view points on the use of properties within classes. My belief is that properties should generally be used to return values of private members. They should not do...
22
by: Peter | last post by:
Hi I was wondering, why use properties instead of get and set methods? I have a colleague who dislikes properties - and much prefers to write "string GetName()" and "void SetName(string name)"...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.