Solved

Is there a way to go into...

Posted on 1999-01-19
1
160 Views
Last Modified: 2010-05-03
Is ther a way to go into another program like word or word pad and delete a word in the thing please help this would be so helpful to me??? See I am making a progarm where a goat walks across the screen and eats a word and i just need one word to disappear. It is kinda as a joke on my friend but i also want it for learning expierence. I am posting all my points so enjoy!
0
Comment
Question by:Moo122398
1 Comment
 

Accepted Solution

by:
HMWT earned 110 total points
ID: 1469502
look up dde (Dynamic Data Exchange) I've got a example ple prog that came with my version of VB. Word was one of the programs that it suposedly can conect to. It works fine on the other example conections. I'v ordered Word but it hasn't yet arived.
You might look to see if an example came with you version of VB.

Here is an example asuming you just your app to look like word, then you can manipulate your window the when you close it word is still the same. ;>

'ctl is a textbox or a picturebox.
'appname is usualy the name of the exe file my example expects 'it to be "WinWord"
'topic must match the value of the linktopic property of the 'window you are trying to access.
'item is the Name of the control you want to access.
'I don't have a clue about the last 2
Function CreateLink% (Ctl As Control, appname$, topic$, item$, LinkType%)
On Error Resume Next
    Ctl.LinkMode = NONE
    Ctl.LinkTopic = appname$ & "|" & topic$
    Ctl.LinkItem = item$
    Ctl.LinkMode = LinkType%
    CreateLink% = Err
    If Err = 0 And LinkType% <> 1 Then 'if linktype<>automatic
        Ctl.LinkRequest
    End If
End Function

you'l have to experiment to see if word prefers ctl to be a picture box or a text box.

if creatlink(...)=282 then 'no app responded.
    'try to start. or in your case you might not want to start
    if shell(appname$)>31 then 'i don't know what the 31 means
        if creatlink(...)<>0 then
            msgbox "huston we'v got a problem..."
        end if 'try to conect again
    end if 'try to start
end if 'no app responed

'do this when ever you want to update your control's data
ctl.LinkRequest

'That about covers every thing except the exact string info you need. try looking at microsoft.com. And of course your manuals now that you no to look for "DDE".
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SSRS expression Issue finding a string 10 65
message box in access 4 41
Copy a row 12 57
Sorting multiple rows and columns, and count duplicates in Excel 2013 4 68
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

914 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

21 Experts available now in Live!

Get 1:1 Help Now