Note that there are some explanatory texts on larger screens.

plurals
  1. POCopy from MS Word document to a web page input box
    primarykey
    data
    text
    <p>In an already open word document select all text<br> copy selected text to clipboard<br> check default browser open at correct web address<br> if not open default browser at web address "<a href="http://thisaddress.com" rel="nofollow">http://thisaddress.com</a>"<br> give focus to browser paste clipboard text into input box called "input1"</p> <p>or some other way to get MSword document contents to a web page input?</p> <p>Currently the workflow involves a secretary logging in to the website, then filling out a web form, switching to their open MS Word document, selecting all, copying the WP document, then back to the web form and pasting into an input box, then hitting submit. What I want to do ideally have a button in MS word which opens the browser to the correct web page then copies and pastes the document into the correct input box on the page (in fact it will be the only textarea form field).</p> <p>The MS Word VBA code is: </p> <pre><code>Option Explicit Enum W32_Window_State Show_Normal = 1 Show_Minimized = 2 Show_Maximized = 3 Show_Min_No_Active = 7 Show_Default = 10 End Enum Private Declare Function ShellExecute Lib "shell32.dll" _ Alias "ShellExecuteA" (ByVal hWnd As Long, _ ByVal lpOperation As String, ByVal lpFile As String, _ ByVal lpParameters As String, ByVal lpDirectory As String, _ ByVal nShowCmd As Long) As Long Function OpenURL(URL As String, WindowState As W32_Window_State) As Boolean ' Opens passed URL with default application, or Error Code (&lt;32) upon error Dim lngHWnd As Long Dim lngReturn As Long lngReturn = ShellExecute(lngHWnd, "open", URL, vbNullString, _ vbNullString, WindowState) OpenURL = (lngReturn &gt; 32) End Function Sub TestMacro() Application.ActiveDocument.Select Selection.Copy OpenURL "http://localhost:8500/index.cfm?wordContent=" &amp; Selection, W32_Window_State.Show_Maximized End Sub </code></pre> <p>and in the coldfusion handling form</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;/head&gt; &lt;body&gt; &lt;form id="form1"&gt; &lt;Textarea ID="txtArea" rows=6&gt;&lt;cfoutput&gt;#url.wordContent#&lt;/cfoutput&gt;&lt;/textarea&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>Just would like to work out how to not open a new browser window if one is already open.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload