How do you hyperlink to Word 2007 help pages? - vba

I want to hyperlink to a page within the Word 2007 Object Model Reference documentation, that ships with Word 2007. These are webpages that use the ms-help:// protocol that Firefox cannot understand.
So I wanted to specify the ms-help:// path of the help page as a command line argument to the viewer, CLVIEW.EXE.
C:\Program Files\Microsoft Office\Office12\CLVIEW.EXE
Does anybody know the command line syntax for this?

CLVIEW.EXE doesn't support command line parameters to launch to a certain page. It's usually used to launch your own custom help file within the hosted Office application.
With Word 2007 there are some options available. They depend, let me repeat, they depend on whether your help is in online or offline mode.
If your intent is simply to get
people to a specific Word help page
and they have internet access, you can grab the URL from the help file
in online mode. To do this,
just right-click on the page you
want the link, for example the
Make the text bold page, to and click Properties. Then copy the URL
(Address) which is:
http://office.microsoft.com/client/helppreview.aspx?AssetID=HA100215341033&ns=WINWORD&lcid=1033. This will work just fine in FF (if you were in Offline mode, this
same link would have been:
ms-help://MS.WINWORD.12.1033/WINWORD/content/HA10021534.htm.)
If you are first sending them to
Word, you can run an macro that
brings up this topic. You grab the
"Topic ID" from right-clicking on
the page Make the text bold page
(which, in this case is
"HA10021534") and put that ID as the
first parameter, like the below.
NOTE: This should work in both
online and offline mode.
Sub DisplayHelpTopic()
Application.Assistance.ShowHelp "HA10021534", ""
End Sub
For developer documentation with the
solution for #2, if you are in
offline mode, you need to set the
scope to "DEV" (which will also work
if you are in online mode). So for
the subject Bibliography Object,
the Topic ID is: HV10096617. If you
are in online mode, you don't need
the "DEV" scope. Code:
Sub DisplayHelpTopic()
Application.Assistance.ShowHelp "HV10096617", "DEV"
End Sub

You can view these documentation pages in Internet Explorer.
Open up your Word docs to the page you want.
Right click, Properties and copy the ms-help:// URL.
Paste this URL in IE, it should open up fine.
Use the command line syntax for IE to hyperlink to it.
Hope that helps, although clicking links in IE may not work properly.
Maybe CLVIEW.EXE has command line syntax that can do this directly.

Related

Edit document properties in MS-Word 2016

I am currently trying to setup a template where the user is prompted to add "tags" to their document when they open a new MS-Word file. Currently I have broken this down in a few parts.
Startup prompt
Connect the document/script to the "tag" property (so the user don't have to manually change it)
Ideally implement a drop-down menu, so I don't accidentally tag some files with small differences such as spaces, case sensitive formating etc.
Currently I have tried most of what Word has to offer, which is why I came here. The easiest answer is to go in "File -> Information -> Tags" and edit this manually, but this is what I hope to automate. I have used the feature "Quick Parts", where I can add a field which edits properties such as "Author", "Tags" etc. The problem here is that they are not customizable, so I can not implement a drop-down menu. I have tried to use the "Developer" section in Word to add controllers such as drop-down menus, but I have not found a way to connect these to the document properties. I also tried using the FILLIN command to see if it could be used as shown below, just to test if I could set these properties from the document in this way.
{ SET bkmTitle { TITLE { FILLIN "Enter the document title" } } }
The problem with this implementation is that I don't want to press F9 in these fields when I start up a new project. I have not done much research into the startup prompt because I see this as the finishing touch, but if anyone has any advice on that too, it would be greatly appreciated.
I don't have any experience with macros/VBA, but I am open to learn if that is the easiest way to realize this project. Thank you kindly in advance.
From Charles Kenyon's links I solved my problem with Quick Parts. My solution was to extract the .docx file so I could access the .xml file within. Inside the .docx file (also works with the .dotm template file found in /AppData/Roaming/Microsoft/Templates). Using 7-zip I opened the .dotm archive and went on word -> document.xml.
I made a template by editing the Normal.dotm (MS-Word template file). Here I added a Quick Part for "Category", then saved the template. I then opened the .xml file as mentioned above where I could edit this Quick Part for the template from textfield to a drop down menu (was not possible to change in Word to my knowledge).
To change it into other types than drop down menu, it is possible to add other control forms from Word by clicking on the "Developer" tab and selecting other controls such as "Checkbox". When you open the "document.xml" file afterwards, you can now see the schema for a checkbox.
When editing the "Document Properties" style Quick Parts, they are automatically linked to the document properties, which is what I wanted to learn how to do. It is probably possible to also use the document.xml file to explore how to link other fields to the document properties. I hope this answer might help others if they want to explore more options in MS-Word.

Word Save Template command returning error

I recently discovered the blissful convenience of being able to use the File, Save command from within the VBA Editor window to save the currently attached template without having to actually be in the template or close out of Word.
I thought it would be nice to have this command available on a Ribbon Tab or the QAT or even a keyboard shortcut, so I first added the Save Template command to a Ribbon Tab. But when I clicked on the tab, nothing happened.
I thought perhaps I needed to tweak things a bit with a macro, so I recorded a macro and clicked on the command, to see what the VBA statement would look like.
It looks simple and straightforward enough, very similar to a bazillion other "ActiveDocument" macros I have stored that run without any issues:
ActiveDocument.AttachedTemplate.Document.Save
But when I run the macro, I get the standard "Runtime error" message, with no hint as to what is wrong.
I cannot find any documentation regarding this command in any of my source material or anywhere on Google, nor can I find any discussions about it.
Any ideas what's missing here? Thanks in advance!
As I discovered, and Cindy Meister confirmed, the following works:
ActiveDocument.AttachedTemplate.Save
It will work even if the template is closed. The version that you got from the Macro Recorder, ActiveDocument.AttachedTemplate.Document.Save works only if the template is open. The version above works whether it's open or not. I don't program much in Word, but it looks like a template's Document object/property is instantiated when the template is opened and otherwise is nothing.

Access 2007 – Unable to Get "AcrobatPDFMakerForOffice" to Work

I am trying to help a small company that is using an .mdb database in Access 2007. Their previous programmer left little documentation, unfortunately. The problem occurs when they call some routines that are intended to create a PDF file from an Access report. The routines were written by Stephen Lebans, and are supposed to be safe and stable. The Lebans routines are called by VBA code.
Here is some more info. The company has a small network with two workstations. On one workstation everything works fine; it is able to call the Lebans routines and create a PDF file. On the second workstation the code appears to execute but no PDF is created. Adobe Acrobat DC was installed recently on both PCs. The problem creating PDF files on PC#2 began after they installed Acrobat DC.
I will probably call Adobe tech support to get their help. But before that I hope someone can help with several questions I have.
Question 1 - In the VBA editor, in Tools -> References, I see that "AcrobatPDFMakerForOffice"
is checked. Please let me know if I should have checked some other reference instead.
Question 2 - The "AcrobatPDFMakerForOffice" in Tools - > References seems to refer to the following file: "c:\Program Files (x86)\Adobe\Acrobat 2015\PDFMaker\Office\AcrobatPDFMakerForOffice.tlb" ,
which is a type library file. Does that seem OK? Or should it point to a "dll" or "exe"?
Question 3 - On PC#1, which is creating PDFs correctly, if I click the Office button inside Access,
select Access Options, then select Add-Ins, I see "Acrobat PDFMaker Office COM Addin" under the heading "Active Application Add-Ins". And the file it refers to is:
"c:\Program Files (x86)\Adobe\Acrobat 2015\PDFMaker\Office\PDFMOfficeAddin.dll".
On PC#2, however, there is nothing listed under "Active Application Add-Ins". So I attempted to add it.
I clicked "Go" next to "Manage COM Add-Ins" at the bottom of the screen; then clicked "Add..." in the
"COM Add-Ins" window that appeared; then navigated to the file "c:\Program Files (x86)\Adobe\Acrobat 2015\PDFMaker\Office\PDFMOfficeAddin.dll"; then click "Add". But nothing appeared under the heading "Active Application Add-Ins".
Any thoughts on how I can add "PDFMOfficeAddin.dll" to the Active Add-Ins list; or if I need to at all?
Thank you!
Cross Posted Here https://www.access-programmers.co.uk/forums/showthread.php?t=295390
As pointed out in that post Access can create a PDF natively now. There is no need of the Lebans code.

Start Word without any popups

I am about to create a VB.NET Application that is able to automatically format Word documents or change specifical things in it. But the applications stops regularly working because Word (working in Background, not visible) opens popup Dialogs, e.g. if the document is a .odt file, or was downloaded from the internet, or even the "Save File" dialog.
Is there any possibilty to prevent Word from opening any of these dialogs?
I haven't found anything in the MSDN Developer Reference concerning this subject either.
Does anybody have an idea how to do this? Thanks in advance.
I haven't done this with Microsoft Word, but I have done something similar in doing COM automation with Microsoft Project from .NET. Below is the code fragment that turns off all sorts of annoying pop-ups from MS Project:
mApp.DisplayAlerts = False
where mApp is Microsoft.Office.Interop.MSProject.Application

Uploading all opened files in dreamweaver?

Is there a way to upload all the opened documents to the current site without having to load em manually?
At the moment for each opened document I select one and I press Ctrl+shift+U but it's kinda lame if you edited more than 10-20 files
thanks
There is no native function however I have this simple cheat I use:
Open up the find and replace dialogue
Do a search for a string that appears in all the open documents. The page title usually has something useful. Make sure "all open documents" is selected. Click "Find All"
The panel appears that shows you all the instances of your search (should be all the open files)
Highlight all the file names in the search results panel, right click, and click "put"
It actually only takes a few seconds and saves you the pain of having to put each file individually. This is obviously for cases where simply highlighting the files and clicking the put button isn't feasible (e.g. files in multiple directories, etc).
In CS6 (not sure about older versions), when viewing the local site, right-click on the project's parent directory, hover on 'Select' and then 'Checked Out Files.'
This will highlight all the files you have checked out and allow you to check them in with one click.
Note: As Dreamweaver gathers all of the check in status information from the server, this can take quite a while if it is a large project. Only suggested for smaller projects, in which case it seems to work great!
Following the same process, you can also select 'Recently Modified', which only searches your local site and is much faster (but doesn't directly answer the check in/out part of your question).
I hope this helps!
I was a big fan of the Get Put All Extension, but it does not work on CS4 or CS5.
Unfortunately, upload all open is not built in. A long while ago I wrote a Dreamweaver extension called Get Put All, which allows for getting or putting of all open documents. It should still be available for sale (probably $5 or under) at the CommunityMX web site (down for me at the moment). I no longer contribute to CommunityMX, so I won't see any proceeds. While written a while ago, it should work fine in newer versions of Dreamweaver.
Just found out how to do it.
Use ctr+select all the files in the tree view under files and then right click on the selected entries and click "put"
SOLUTION:
1) Click on "Site"
2) "Manage Sites" (Select the site you want to manage)
3) "Edit"
4) "Remote Info"
5) And tick the checkbox "Automatically upload files to server on save"
(See where I am going here)
Have all the files you want to upload OPEN on Dreamweaver
6) Then "Find" a common code each document has
7) And "Replace ALL" with the EXACT same code
*Make sure "Find in: OPEN DOCUMENTS" is selected before you do the replacement
Once Dreamweaver has find and replaced the exact code - all documents will be unsaved at this point.
8) Just click "Save All" and voila!!! Now your CTRL+SHIFT+U fingers can chill the F out!
Hope this helps!
Oh, Remember to uncheck "Automatically upload files to server on save" afterwards or when not needed
PS: When you click "Save All" - you might get Dreamweaver saying "NOT RESPONDING". Just leave dreamweaver alone until it's done because it's uploading files at a rapid rate depending how fast your internet is :)