Depending on how you want to use, a better method could be
Imports System.IO
Dim fullPath as String = "C:\Users\Profile\MyProfile\List.txt"
Dim drv as String = ""
drv = Path.GetPathRoot(fullPath) 'Returns "C:\"
You can use substring.
Dim fullPath as String = "C:\Users\Profile\MyProfile\List.txt"
Dim drv as String = ""
drv = fullPath.Substring(0,3) 'Returns "C:\"
drv = fullPath.Substring(0,2) 'Returns "C:"
oops. I thought they were talking about VBA for MSOffice and the listbox, not VB6, so I don't know if my suggested events will work or not... Im not familiar with VB6's controls.
When you create a table in Microsoft Word, it is automatically set to not apply any sort of text wrapping to the table.
Have you turned wordwrap on? If not the table's properties will force it to a single line cell
Im not sure if you've figured this out on your own or not (considering the question is a month old), but have you given thought to placing your table adapter in a procedure then when someone performs a search, you pass the required data as arguments then perform your search within the scope of...
We use a third-party app (CDL) that generally runs for 7+ hours while it compiles data. The people who use the CDL have about a 50-ish step program that they have to do manually and simple mistakes can crash the data build. I am writing a little app to automate the steps and to incorporate data...
Not to get into an argument here but how did YOU "put the procedure as a menu item ("Demo Split") under Tools"? YOU did it because you either wrote a snippet of code, or manually added the menu item by using the Tools "customizations" options and assigned it yourself.
Easy enough, I do the...
I am still confused as to why you want to do this every time you start up Word (i.e. using AutoExec)
I have the code in there because as a minimum, I need the following statements to execute so that the "macro" code will at least show up on the TOOLS menu:
Const myProcName =...
Gerry,
Thank you very much for the clarification
Documents.Open Filename:= "fullPATH...\Application Data\Microsoft\Word\STARTUP.SRStags.dot"
I was confusing the ability to call the procedures in SRStags (loaded) with the .dot file being open for the application.
Thanks
Gerry,
Thanks for the information. I can see that I left out some information in my first post. My template is in the ...\Application Data\Microsoft\Word\STARTUP folder in a template called SRStags.dot
This has been my first attempt at creating an add-in, and due to other job constraints I...
Gerry
What exactly is the purpose of the AutoExec?
The purpose of the AutoExec() is to execute any code it contains as soon as the application opens (think of it as an AutoExec.bat file when your computer boots)
The procedure - SRStagMain - is in the add-in, and you are trying to change it...
Insert in a MODULE, then when using the INSERT FUNCTION, you can find it listed under category USER DEFINED.
'-----------------------------------------------------------------------------------------
'-----------------------------------------------------------------------------------------...
I have an add-in template I created for MSWord (basically customized search and replace code). It runs from a dot/dotm template file in the MSWord startup folder. Code works just fine.
My problem is with trying to assign a shortcut key to run the "starting" procedure (SRStagsMain).
Im looking...
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.