This is the kind of thing I use. Add it to a vbs or vba program and run it when an email arrives or alternatively add it to scheduled tasks to check every now and then...
Dim mliNew As MailItem
Dim ns As NameSpace
Dim oOutlook As Outlook.Application
Set oOutlook = New...
Hi,
I want to set up an Outlook rule so that a VBScript saving and re-naming attachments runs when an e-mail with a particular 'subject' arrives. Can this be done?
well the code is very boring,. In effect:
for lCol = 2 to lNumCols
sUnit = sht.cells(1,lCol)
for lRow = 2 to lNumRow
dDay = sht.ceslls(lRow,1)
debug.print sht.cells(lrow,lcol)
next
next
sUnit and dDay return correct values but the vlookup in
sht.cells(lrow,lcol) returns "Error 2029"...
I have a spreadsheet with dates in Column A, unit names along the top and a whole lot of vlookups on the eomonth of the dates in between. For some reason when I use VBA to read this matrix into a database, it returns "Error 2029" as the value for each vlookup.
I have a simple workaround to...
I have 2 data access pages. On the first the user enters criteria and then clicks a button. Then the second should open with the query results. How do I get the button to recreate a hyperlink and open the 2nd page?
Sorry I cut and paste this. Not very clear is it?
I have converted a Form to a Data Access Page. There are several comboboxes on the form each sourced from a different query. As the user selects something in a combobox, the queries for the other comboboxes need to be rewritten. This works fine...
You can select an event in the same way as you would for a Form and then in VBScript try "MSODSC.EXECUTE querystring"
Make sure that the connection string is correct though!
I've only just started with DAPs. They're bloody awkward things.
First I delete the query which is the listrowsource of the combobox
msodsc.RecordsetDefs.Delete "querysource"
then I build up a new SQL query - that works fine
then I want to add this new query as the listrowsource of the combobox but I dont know where to start this really as the DAP combobox...
First I delete the query which is the listrowsource of the combobox
msodsc.RecordsetDefs.Delete "querysource"
then I build up a new SQL query - that works fine
then I want to add this new query as the listrowsource of the combobox but I dont know where to start this really as the DAP combobox...
Well, maybe but I tried that yesterday and didnt get anywhere and since the code for a Data Access Page is written in VBScript it didnt seem inappropriate to try here as well.
I have a Data Access Page created from a Form. There are several combo-boxes on the form and when something is selected in Box A the record source query for Box B is edited accordingly. I cant see any way to get this to work for the DAP (ie there is no listRowSource property for the combobox in...
I have a Data Access Page created from a Form. There are several combo-boxes on the form and when something is selected in Box A the record source query for Box B is edited accordingly. I cant see any way to get this to work for the DAP (ie there is no listRowSource property for the combobox in...
set oexcel = new excel.application
set osht = oexcel.workbooks.open("filename")
oSht.Range("toprint").PrintOut Copies:=(x), Collate:=True
where x is the number of copies
This will print out a range on your default printer
Cheers, guys. Lifesaver. It didnt like InlineShapes (didnt find any items in the collection) but I got this to work:
Dim owdSource As Word.Document
Dim owd As Word.Application
Dim oCopy As Word.Shape
Dim rCopy As Range
Set owd = New Word.Application
Set owdSource = owd.Documents.Open(sWordDoc)...
Sorry,no. Every day I get sent a word document with an Excel sheet embedded in it. I need to be able to open the document, and get the data out of the embedded Excel sheet, to store elsewhere
I want to be able to either:
(1) use an excel sheet embedded in a word doc like any other Excel book, or
(2) copy and paste the Excel object into Excel
I've no idea about doing (1) and am stuck on (2)
Set owd = New Word.Application
Set owdSource = owd.Documents.Open("blahblahblah.doc")...
I want to be able to either:
(1) use an excel table embedded in a word doc like any other Excel book, or
(2) copy and paste the Excel object into Excel
I've no idea about doing (1) and am stuck on (2)
Set owd = New Word.Application
Set owdSource = owd.Documents.Open("blahblahblah.doc")...
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.