I am developping com addins for word. I want to find out if there is a way to click on the customized button in toolbar programmatically. I tried to call like this in module. Application.CommandBars("MYWORDTOOLBAR_NAME").FindControl("MYBUTTON").execute but I am just getting this error message "fail method "Execute" of object CommandBarButton" Do you have any idea why? van
vancouver777
Posts
-
Call Com Addin Toolbar from program -
Hook keyboard event in word com addinIs there any way to hook keyboard input as wl as mouse clicking event? Word.Application object has an event called WindowBeforeDoubleClick I am looking for similar event for keyboard. I am trying to find a way to enable a toolbar button when active document is modified. Van
-
launching msg file at loadingI have .msg file( outlook email) and successfully loaded the msg file into the outlook in the notes folder. However, I can't launch the loaded email. Here is how I did in order to launch the outlook note. Dim objNameSpace As Outlook.NameSpace Dim objMAPIFolder As Outlook.MAPIFolder Dim objMailItem As Outlook.MailItem Set objMAPIFolder = objNameSpace.GetDefaultFolder(olFolderNotes) Set objNoteItem = otlkDoc.CreateItemFromTemplate(str_FileName) objNoteItem.Move objMAPIFolder objNoteItem.Save objNoteItem.Display 1
-
display Outlook NoteItem at loadingI am developing outlook Com Addin. At loading mynotes.msg( notes ) to outlook, I also want to launch this note. NoteItem as member function called Display, however it doesn't do anything. The following is the exact code from my app for launching loaded note(msg file). Something wrong with my code or know workaround to launch this loaded note item? Dim objNameSpace As Outlook.NameSpace Dim objMAPIFolder As Outlook.MAPIFolder Dim objNoteItem As Outlook.NoteItem Dim str_Body As String Set objNameSpace = otlkDoc.GetNamespace("MAPI") Set objMAPIFolder = objNameSpace.GetDefaultFolder(olFolderNotes) Set objNoteItem = otlkDoc.CreateItemFromTemplate(str_FileName) objNoteItem.Save objNoteItem.Display Set objNoteItem = Nothing
-
Outlook Com addin IDTExtensibility2Is there any way to add right click menu (adding extra menu item to launch my app) on mail. I hope this can be easily by adding a key in the registry. Van
-
Convert Print preview to jpeg fileI am working on the office Com Addin. Is there any way to get print preview and convert to jpeg file? Shin
-
how to get cpu info, mem, etcI am not sure it works in .Net but here is how to do it in vb. I just found this, so you have to find a way to be compilable. Thanks, Shin Option Explicit Private Type SYSTEM_INFO dwOemID As Long dwPageSize As Long lpMinimumApplicationAddress As Long lpMaximumApplicationAddress As Long dwActiveProcessorMask As Long dwNumberOrfProcessors As Long dwProcessorType As Long dwAllocationGranularity As Long dwReserved As Long End Type Private Type MEMORYSTATUS dwLength As Long dwMemoryLoad As Long dwTotalPhys As Long dwAvailPhys As Long dwTotalPageFile As Long dwAvailPageFile As Long dwTotalVirtual As Long dwAvailVirtual As Long End Type Private Declare Sub GetSystemInfo Lib "kernel32" ( _ lpSystemInfo As SYSTEM_INFO) Private Declare Sub GlobalMemoryStatus Lib "kernel32" ( _ lpBuffer As MEMORYSTATUS) Private Sub Form_Load() Dim Sys As SYSTEM_INFO Dim tMem As MEMORYSTATUS GetSystemInfo Sys GlobalMemoryStatus tMem Debug.Print "Percentage of memory currently in use : " & Format(1 - (tMem.dwAvailPhys / tMem.dwTotalPhys), "00.00 %") Debug.Print "Total Available : " & Format(tMem.dwAvailPhys, "### ### ###") Debug.Print "Total Physical : " & Format(tMem.dwTotalPhys, "### ### ###") Debug.Print "Total Virtual : " & Format(tMem.dwTotalVirtual, "### ### ### ###") Debug.Print "Processor Type : " & Sys.dwProcessorType Debug.Print "Number of Processor(s) : " & Sys.dwNumberOrfProcessors End Sub
-
Importing/Loading MSG file into Outlook InboxI am working on the outlook addin. Dim otlkDoc as Outlook.application Dim otlEmail As Outlook.MailItem otlEmail = otlkDoc.Application.CreateItemFromTemplate("c:\abc.msg") seems like this function CreateItemFromTemplate doesn't work for .msg file? what i want to do is to load .msg file from local pc and add it into the outlook inbox. anyone can help? Shinya
-
Word.Application how to load to object without openI found a solution. the dll dsofile.dll was availble for getting office document properties with out open. I downloaded and used from kb. Thank you. Shin "Microsoft Knowledge Base Article - 224351 " Dim oFilePropReader As DSOleFile.PropertyReader Dim oDocProp As DSOleFile.DocumentProperties Set oFilePropReader = New DSOleFile.PropertyReader Set oDocProp = oFilePropReader.GetDocumentProperties(strFileName) Debug.print oDocProp.Title 'display the title of document set oFilePropReader = nothing
-
Word.Application how to load to object without openThank you for your input, This is the way to get the document property Is there any way to open the word document silently? The source code below is not working. wordApp.Documents.Open strFileName wordApp.Visible = False VB6/Windows2000 Shin
-
Word.Application how to load to object without openI am trying to get word document title and number of word in the document Currently, I can only get these properties from opening the document. Is there any way to get these information without actually opening the word document. Shin
-
How to Select Root in TreeView?just like "root element" in xml
-
How to Select Root in TreeView?Is there any way to select Root element? VB6
-
Drag file and folders to listviewAnyone has seen sample program before?
-
right click file menuI haven't figure out yet. I will need this in the future. any can help? van
-
Office Com Addincan you tell me how to do this VBA. I might get hint out of it. Thanks
-
hyperlink limit?never mind i resolve the problem. I write to a email file ****.eml and launch the file. instead of handling everything in memory. Thanks 777
-
right click file menuI guess i miss your point.( i am trying to meet the deadline...) I think your have to add the extra parameter in the registery key. so if you want to add start your app to unzip/zip you might put two keys like the following HKEY_CLASSES_ROOT\exefile\shell\my app unzip\command\C:\myapp.exe "unzip" HKEY_CLASSES_ROOT\exefile\shell\my app zip\command\C:\myapp.exe "zip" and you will see two menus in context menu. one is linking to your app with unzip parameter the other is zip. At your application side on the startup, you can see Command$ to figure out which menu has been clicked. For example msgbox Command$ ( you will see either "unzip" or "zip" in this case) hope i answer your question right.
-
hyperlink limit?I have hyperlink that is more than 50 character when I specify it as the following to launch the outlook CString str_content = "click here"; ShellExecute( NULL, "Open", "mailto:my@domain.com?Body=" + str_content, NULL, NULL, SW_SHOWNORMAL ); If i have shorter str_content and I launch, I can see hyperlink in my outlook. However, if str_content becomes longer just text displayed in outlook content with all hyperlink code. How can i get the hyperlink in outlook when i have longer string. 777
-
right click file menuHKEY_CLASSES_ROOT\exefile\shell\YourAppName\command\ YourAppName: this is what you are going to see in your right click menu. command: you specify the path to your app exe probably with %1 For example if you have app called myapp.exe in C:\ and want to display "start my app" on the right click menu you said HKEY_CLASSES_ROOT\exefile\shell\start my app\command\ in side of command you have "C:\myapp.exe %l"l is not the number but alphabet 'L' Just for your info if you add the right click menu on directory this is the place to add the same thing HKEY_CLASSES_ROOT\Directory\shell\start my app\Command Good Luck!