|
Hi all,
Is there any component which can make a HTTP request in VBScript? I don't need a UI, just do a GET/POST request.
Thanks in advance.
Johnny Xia
|
|
|
|
|
|
Setup is properly copying my active-x controls and axdist.exe, but it is not executing it; i.e. my controls are not being registered automatically. Everything seems to be in the right place since I can manually launch axdist.exe and the registration completes. How do I get my setup.exe to do this automatically? Here is the line from setup.lst:
File9=@AXDIST.EXE,$(WinPath),,$(Shared),8/12/01 12:15:42 AM,40448,2.0.0.0
|
|
|
|
|
How do you move an item in a VBA listbox using drag and drop?
I know how to do it in VB6, but not VBA.
|
|
|
|
|
Hi All
I've created a program that cleansup our components from the registry.
(because there are always some left overs)
And now i would like to add a feature that enables backingup the registries
entries that where deleted.
How do i do that?
I don't want to use getsettings/savesettings.
It would be greate to export it all to some reg file.
Thanks for your time.
Yoav
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers." - Socrates
|
|
|
|
|
How can I know how many users are logged on a Ftp (Internet Information Server 4.0) server?
Many thanks
Carlo Cardella
|
|
|
|
|
There are performance counters that shows that...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hello,
I have a slight problem that I can't seem to get figure out. In MSword, I have a macro that scans for comments and saves them to a text file along with its extra info in a csv format. With this, I import it to excel and get the ref number, page number, who wrote it, etc. What I need help with is, can someone help me w/ code they already have that will have a macro that lets you choose a word file, and scans it, and places the fields into it without having to create a "middleman" file and without having to open up word?
==================================================================================================
Open "C:\Windows\Desktop\output.txt" For Output Access Write As #1
Dim Item As Integer
Item = 0
For Each Comment In ActiveDocument.Comments
With Comment
If Left(.Reference.Paragraphs(1).Style, Len("Heading ")) = "Heading " Then
Else
.Reference.GoToPrevious (wdActiveEndAdjustedPageNumber)
End If
Section = .Reference.GoToPrevious(wdGoToHeading).Paragraphs(1).Range.ListFormat.ListString
Page = .Reference.Information(wdActiveEndAdjustedPageNumber)
Author = .Author
Text = .Range.Text
Line = .Reference.Information(wdFirstCharacterLineNumber)
Doctext = .Scope.Text
'MsgBox "Section number is " & .Reference.GoToPrevious(wdGoToHeading).Paragraphs(1).Range.ListFormat.ListString & vbCr _
' & "Line number on page is " & .Reference.Information(wdFirstCharacterLineNumber) & vbCr _
' & "Page number is " & .Reference.Information(wdActiveEndAdjustedPageNumber) & vbCr _
'& "Text is '" & .Range.Text & "'"
Item = Item + 1
Print #1, Item; ","; Page; ",'Sec "; Section; "','Line "; Line; " on page','"; Author; "','"""; Doctext; """: "; Text; "'"
End With
Next
Close #1
End Sub
=================================================================================================
This code is somewhat ugly, and needs some cleanup, but if someone could show me how to at least initiate the open/import in excel, i can still use this code for the processing.
Thanks
P.S. Is there anyway to create a (a right click) menu item that will run the macro?
|
|
|
|
|
This code will pass info from word to excel
DDE Example
The following example establishes a DDE link with Microsoft Excel, places some values into cells in the first row of a new worksheet, and charts the values. First, the DDEInitiate function opens a channel to begin the DDE conversation. Then, the DDEExecute statement sends Microsoft Excel the command to open a new worksheet, and the DDERequest function asks Microsoft Excel for the name of the newly created worksheet. A new channel is opened, and the DDEPoke statement sends to Microsoft Excel the data to be charted. Finally, the DDETerminate statement terminates the DDE link with Microsoft Excel, and the DDETerminateAll statement terminates all active DDE links.
Sub ExcelDDE()
Dim intI As Integer, intChan1 As Integer
Dim strTopics As String, strResp As String, strSheetName As String
On Error Resume Next ' Set up error handling.
intChan1 = DDEInitiate("Excel", "System") ' Establish link.
If Err Then ' If error occurs, Excel may
Err = 0 ' not be running. Reset error
Shell "C:\Excel\Excel.exe", 1 ' and start spreadsheet.
If Err Then Exit Sub ' If another error, exit.
' Establish Spreadsheet link.
intChan1 = DDEInitiate("Excel", "System")
End If
' Create new worksheet.
DDEExecute intChan1, "[New(1)]" ' Get topic list, worksheet name.
strTopics = DDERequest(intChan1, "Selection")
strSheetName = Left(strTopics, InStr(1, strTopics, "!") - 1) ' Terminate DDE link.
DDETerminate intChan1 ' Establish link with new worksheet.
intChan1 = DDEInitiate("Excel", strSheetName)
For intI = 1 To 10 ' Put some values into
DDEPoke intChan1, "R1C" & intI, intI ' first row.
Next intI ' Make chart.
DDEExecute intChan1, "[Select(""R1C1:R1C10"")][New(2,2)]" ' Terminate all links.
DDETerminateAll
End Sub
|
|
|
|
|
Hey thanks a lot for the response, however it made little sense to me (I have never tried to program a vba macro before, and the initial one i started out with was made by a coworker). But anyways, when you mentioned DDE, I decided to do a little research on it and direct communication with other MS apps. I stumbled on some more automation code, and I think I got what I was looking for, but I'm still getting a few errors.
Here is the new code first of all:
Sub CommentImporter()
Dim myFile As String
Set myCell = ActiveCell
Dim myCellvalue As String
Dim Item As Integer
Dim myRow As Integer
Dim myCol As Integer
myRow = 0
Item = 0
myFile = InputBox("Give the path of the file desired to be scanned")
Set WordApp = CreateObject("Word.Application")
Set WordDoc = WordApp.Documents.Open _
(myFile)
WordApp.Visible = False
For Each Comment In WordDoc.Comments
myCol = 0
With Comment
If Left(.Reference.Paragraphs(1).Style, Len("Heading ")) = "Heading " Then
Else
.Reference.GoToPrevious (wdActiveEndAdjustedPageNumber)
End If
Item = Item + 1
myCell.Offset(myRow, myCol).Value = Item
myCol = myCol + 1
'Page = .Reference.Information(wdActiveEndAdjustedPageNumber)
myCell.Offset(myRow, myCol) = Page
myCol = myCol + 1
'Section = .Reference.GoToPrevious(wdGoToHeading).Paragraphs(1).Range.ListFormat.ListString
myCell.Offset(myRow, myCol) = Section
myCol = myCol + 1
'Line = .Reference.Information(wdFirstCharacterLineNumber)
myCell.Offset(myRow, myCol) = Line
myCol = myCol + 1
Author = .Author
myCell.Offset(myRow, myCol) = Author
myCol = myCol + 1
Doctext = .Scope.Text
Doctext = Replace$(Doctext, Chr(13), Chr(10))
Text = .Range.Text
myCell.Offset(myRow, myCol) = Doctext + " : " + Text
myCol = myCol + 1
myRow = myRow + 1
End With
Next
WordApp.Quit SaveChanges:=wdDoNOtSaveCanges
Set WordApp = Nothing
End Sub
As you may have noticed, i have commented out a couple of things in the loop. This is because i keep getting value out of range errors when i run them. That seems to be my only real problem with the code for right now, but i have one more issue that isn't really open now, but will be when i get this working is: Excel cells can only have so many characters, if my comment/text from the document is too long, how can I tell it to make a new cell right underneath it? I think I have to be able to 'count' the characters, and if they are over the limit (which i don't know exactly) and just move it down a column, and print the rest there? If anyone has done this before, or knows an answer to any of the aforementioned problems, please help, thanks.
|
|
|
|
|
Well, stupid me, i figured out why word commands weren't working, i had to reference them in tool/references.
Moral of the story: If you are doing vba from one ms app to another, just make sure you check and see if you there is a reference to it. Even if you might not need it, i would say its better to be safe than sorry
|
|
|
|
|
I have made a Static Library (*.lib) using Visual C++.
I want to use the same static Library in a VB application.
how do i go about this...?
please can anybody help me out...
Shailesh Dixit
|
|
|
|
|
|
Create a DLL or COM DLL in VC++ and use it from VB
|
|
|
|
|
Try :
http://www.banasoft.com/MakeEx.htm
|
|
|
|
|
How can I write a component that imports / export images (bmp/gif) from a local system to a database.
|
|
|
|
|
It is possible to run a script from the command line by typing script.vbs. Is it possible to pass parameters to that script? If so could somebody give me a short example of how to do it.
Thanks for any help you can give.
Steve
|
|
|
|
|
Hi
Try this first: "Wscript //?" (without the ")
Type it and you will get more information.
You can type it in the Start->run...
or from the command line .
Yoav
"Children today are tyrants. They contradict their parents, gobble their food and tyrannize their teachers." - Socrates
|
|
|
|
|
I finally finished my application which compiles and runs perfectly on my computer, but zero luck with the Packaging and Deployment Wizard. Problem is I don't know where to begin to find out what is wrong. Here is what I know:
1. The "Wizard" says the build is good, generating a single CAB file.
2. When I try an install, "Setup" reports a "Runtime Error 216 @ 2F78"
3. Setup says the installation is successfull.
4. I try to run the newly installed software and get a "DAX Error - Library not Registered"
5. Next, "Runtime error 50003" is reported.
6. Program closes.
A few other strange things... It keeps trying to add Graph9.exe from the Microsoft Office Library to the build, even though I dont' use anything like that (seems to have something to do with the "Chart" component). I can elect not to include it, but it adds it to the cab file any way. The first time I ran the Wizard it said it could not determine if there are dependent files for Graph9.exe and comdlg32.dll. It no long comes up with that error. Also, the first time I tried it said that, if I wanted to run my application under Win 95/98, I would have to include DCOM98, but no instructions on doing so. It no longer does this either.
Bottom line, I am completely stuck. Is there some other tool for doing this (hopefully something more helpful). Lastly, I notice that when it does attempt the install, there is listing in the "Add / Remove Programs" utility in the Control Panel of the target machine. How is this done?
|
|
|
|
|
hi all,
i wrote a vb application link to excel spreadsheet.
i would like to know how i can deploy this application. i found that the app. reference to excel9.olb. i have included it in my deploy setup file. however, the app. still failed to run. the runtime error is "ActiveX can't create server".
however, it work perfect after i installed office.
could anyone help me?
regards,
Jim
|
|
|
|
|
With a Cmd Button, I want to copy files (always the same (*.DAT)from C:\ to A:\.
But, the instruction 'CopyFiles "Source", "Destination" ' doesn't work.
How must I do ?
Thanks a lot !
MARNEFFE Ph.
|
|
|
|
|
*.Dat is not a valid entry for copyfile... You must add a fileview control to your form. change its pattern to *.dat. Set it invisible. When you project runs set its path to "C:\" and use this code:
for i = 0 to file1.count-1
copyfile "c:\" & file1.list(i), "a:\" & file1.list(1)
next
have good programing,
Cem
|
|
|
|
|
check out this article from ms. You can use any wildcard with this procedure.
http://support.microsoft.com/support/kb/articles/Q151/7/99.asp
|
|
|
|
|
Hi,
I would want to do the following from Visual Basic for Applications, in e.g. Word 2000/XP:
A macro that copies the current selection from the application (i.e. words), assigns the string to string variable, inserts another string in front of the previous and copies the whole thing to the clipboard.
How do I proceed? Thanks for any help.
--
/Daniel
|
|
|
|
|
Hi ppls,
I am now try to design a program that can be inputed with multi language. I use a normal textbox and set it's font to Arial Unicode MS for input. I turn the script of this font to Arabic then I can type arabic there but when I try to type another language like Japanese then it doesnt accept it! has some one a idea how can I use one textbox that support all language?
Thanks
|
|
|
|
|