Results 1 to 9 of 9
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to interact... (2000 sr 1)

    How to inetract with a windows of WINDOWS via VBA?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to interact... (2000 sr 1)

    Please explain how you want to interact.

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to interact... (2000 sr 1)

    ... read and write in txtbox of windows of Windows , for example...
    ... insert a url in the addres of Explorer and press go, for example...

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to interact... (2000 sr 1)

    I don't know how to do that; perhaps someone else can help you.

  5. #5
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to interact... (2000 sr 1)

    Edited by HansV to make link to post. Please see <!help=19>Help 19<!/help> for instructions on how to do that yourself.

    For example send a command to the print dialog: <post#=429513>post 429513</post#>

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: How to interact... (2000 sr 1)

    Normally, you would control the Print dialog from within Word, using Word VBA and perhaps SendKeys, not a Windows API function.

  7. #7
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How to interact... (2000 sr 1)

    ... but in effect i want make variuos interaction with Windows API functiuon via VBA native...

  8. #8
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: How to interact... (2000 sr 1)

    Sal,

    If you tell us EXACTLY what you want to do, then we may be able to tell you EXACTLY how to do it.
    If you say you want to control something from VBA then all we can say is write the correct VBA code to control that thing.

    StuartR

  9. #9
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: How to interact... (2000 sr 1)

    In Diana's case (the message you linked), the setting is stored in Word, and is "sticky" from one print job to the next. As far as I know, there is no Windows API or VBA trick to change that setting without showing that dialog and printing with the new setting. It may be that reaching back to Word's past, to WordBasic, there could be a way, but I think this is not a good example of what you are trying to accomplish.

    In VBA, we typically try one of two methods to change settings in a dialog:

    The first is to change arguments in the dialog as part of a call to the Dialogs collection. For example, there are many posts in the Lounge that work with the FileSaveAs dialog, either setting the file name/path before showing the dialog, or capturing the name after showing it and before saving. Some dialogs do not have all the arguments required to set these options. The ones that work are listed in the VBA help for the Dialogs collection (click displaying built-in dialog boxes, then in Word 2000 a link, or in Word 2002 "See Also", for the available arguments). This hopefully will cover some of your examples.

    The second method is SendKeys. This is not completely reliable, but for some situations, it is the only alternative to telling the user to do it himself.

    Windows provides the ability to monitor or "hook" dialogs when they open. Our document management system (DMS), WORLDOX, works on this principle. For example, when a user choose File>Save As... in Acrobat Reader, as soon as the application's dialog opens, WORLDOX launches a screen in front of it to coordinate the saving of the document into the DMS. There is a process running at all times that does nothing but look at new windows and launch pop-ups in front of them if the program has been configured to do so. I don't know much about how this works and found it difficult to customize when I experimented with it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •