I solved this:
Dim appExcel As Excel.Application
Set appExcel = GetObject(, "Excel.Application")
appExcel.Visible = True
With appExcel.ActiveWorkbook
.Sheets(1).Cells(m, n).Value = TestString1
End With
appExcel.Visible = True
Hi
Thanks for the help.
I have a problem here now, the (excel) window does not show up. The applications is running but cant locate the window.
And I cant use:
appExcel.display
Is there some way to bring the application visible?
Also, if I don't want a new Excel app to be open each time I...
Hi
I need to move my stored string value in Outlook, to a cell (any cell) in Excel.
But I have trouble to insert the value to the excel.
I don't want to do the cheesy way of copying the word to clipboard and paste the text to excel.
Lets start with this easy code (how should I proceed?):
Sub...
Hi
I think this is an appropriate section to start this thread (VBA) that has to do with API:
I will put an application window that we all share called: "Map Network Drive" (see the pic). Found in My Computer, Tools, Map Network Drive...
http://i49.tinypic.com/63srqe.jpg
1.
From this window, I...
Simple VBA version (works, but I want to avoid sendkeys):
Sub GetStringValue()
Dim Sig As String
Dim OutlookMessage As Object
AppActivate ("Map Network Drive")
SendKeys ("^C"), True 'Need to avoid sendkeys, like using WM_COPY
Set OutlookMessage =...
Hi
I need some help, and to ask my question in the easiest way I will put an application window that we all share called: "Map Network Drive" (see the pic).
http://i49.tinypic.com/63srqe.jpg
In that window, there is an textbox area (right to folder), where you can write, copy, etc.
What I...
No.
Sorry that the text "Wish copy this selection" was misleading/wrong). I was using the picture in another forum.
That was just an example of an area in a app/window where I would like the string value in >Outlook< to be inserted.
Say from Outlook Macro:
Dim MyData As New DataObject
Set...
Hi
Thanks for the feedback.
And the code really works =)
Open "C:\test.txt" For Append As a
starts a new txt file.
But I have a question for if I want to apply text to an already open application.
Like brining the focus to the application and add (append?) the text.
I think we went offtrack.
Let me simplify the code:
Public Sub Sample()
Dim MyText As String
Dim MyData As New DataObject
Set MyData = New DataObject
MyText = "<Replace this with your text>"
MyData.SetText MyText
MyData.PutInClipboard
AppActivate...
See the comment areas.
Public Sub CNCText()
Dim Application As New Outlook.Application
Dim mail As Outlook.MailItem
Dim mailBody As String
Dim SpacRat As String
Dim EngFed As String
Dim TackVia As String
Dim MyText As String
ActivateWin
For i...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.