timeless
01-26-2012, 07:59 PM
I have an outlook macro that I run from an outlook contact card. the macro opens up an excel workbook and then puts the contact File As name in a cell in the spreadsheet. The maco works fine until I open up my dictating software dragon naturally speaking. Running Outlook & Excel 2010, Windows 7 and Dragon Natuarlly Speaking 11.5
when the macro is working fine it opens the workbook puts the file as name in the right cell and the workbook becomes the active window on my screen
When the dictation software is open it does everything but the contact card remains the active screen and the worksheet is active in the background. I often have different excel workbooks open and the code opens my workbook in a new session of Excel
I am a hack and copied the code modified it but do not really understand it
I have pasted my code below
Sub OpenRTLog()
Dim objContact As Outlook.ContactItem
Set objContact = Application.ActiveInspector.CurrentItem
MyValue = objContact.FileAs
Dim objExcel As Object
Dim objWB As Object
Set objExcel = CreateObject("Excel.Application")
Set objWB = objExcel.Workbooks.Open("C:\00 CapSheet\RTLog.xlsm")
objExcel.Visible = True
objExcel.Cells(1, 2).Value = MyValue
End Sub
Thanks
when the macro is working fine it opens the workbook puts the file as name in the right cell and the workbook becomes the active window on my screen
When the dictation software is open it does everything but the contact card remains the active screen and the worksheet is active in the background. I often have different excel workbooks open and the code opens my workbook in a new session of Excel
I am a hack and copied the code modified it but do not really understand it
I have pasted my code below
Sub OpenRTLog()
Dim objContact As Outlook.ContactItem
Set objContact = Application.ActiveInspector.CurrentItem
MyValue = objContact.FileAs
Dim objExcel As Object
Dim objWB As Object
Set objExcel = CreateObject("Excel.Application")
Set objWB = objExcel.Workbooks.Open("C:\00 CapSheet\RTLog.xlsm")
objExcel.Visible = True
objExcel.Cells(1, 2).Value = MyValue
End Sub
Thanks