I can't find a way to copy selected documents to buffer using standard classes in LotusScript.
Is it possible to do it?
#Command([EditCopy])
The problem with command/formula - is more difficult to debug/log errors etc, so I wish to re-write action to LotusScript if possible.
I can make a solution via Java and then wrap it into LS2J, but it looks to complicated for such simple operation.
You can't copy selected documents to clipboard with standard LotusScript Notes classes.
NotesUiDocument.Copy() doesn't help you neither as it copies only selected parts of an open document.
I would stay with #Command([EditCopy]). If it's really worth it to move the formula code to LotusScript I would separate #Command([EditCopy]) in an agent and call it from your new LotusScript code.
But, the question is, what is the goal to copy selected documents to clipboard? It will be a Notes Client specific kind of clipboard content. You can only use it in Notes Client itself to copy the documents into the same or another database. So, why not use "normal" LotusScript methods to copy documents like NotesDocument.CopyToDatabase or NotesDocument.CopyAllItems?
Related
I need a person to be able to input information into a field in a PDF then later be able to select and copy all information from that field with a single click so they may paste it into another field on a website.
Purpose. I am trying to create a master application which people with disabilities may complete and use as a simple way to fill out other applications. I don't believe I can create an autofill ability which will be useful for the thousands of different methods of job application but I want the human to be able to select the correct field then, in as few clicks as possible, copy information from a field in the PDF and paste it into one they deem as appropriate in another application.
I am an idiot, this is a passion project.
It may be simpler depending on user cases to work inside the browser framework. Here is totally non typical usage for copy data from local personal html into remote form. IT depends heavily on the remote site accepting it can be embedded as if a local frame thus not useful for generic use but may work for controlled caseload's
I want to know whether there is a way to connect a Fillable PDF document and excel sheet. I know this question may be little open ended. But I have been searching a lot to find out if there is a way to do it, without much success. My requirement is I want to connect a Fillable PDF with an excel sheet, so that whenever we fill the PDF document, the excel sheet automatically populates.
I am not sure whether this is possible or not. If it is possible, can anybody tell me a way to do that? So that I can search on it and figure it out?
In the olden days, it was possible to set up a direct connection, using ODBC (and the ADBC object in the PDF). This has, however, been abandoned a few Acrobat versions ago.
The most direct connection would be based on SOAP, but it requires Acrobat; it does not work with Reader.
All other ways of communicating with a database/spreadsheet are asynchronous, meaning that you have to initiate the process from your form.
You can use the form to create a tab-delimited file which you then can import into your back end, or you can submit data to a server which then communicates with the back end. Or, as it has already been stated, you can control Acrobat using VB (or Applescript), and get data out by this way.
I have a scenario where users download their Word document from our local server and when they save that document, instead of saving it locally, the document is sent back to the server using a macro (which is "injected" by the server every time a user downloads a document that doesn't contains the latest version of the macro).
Now that we are going to send this solution to our final tests prior deploying it, we needed to protect that macro, I know I can password protect a macro using Microsoft Office by simply right clicking in the macro project inside the document and selecting "block from viewing" and inserting a password.
However, since the macro must be handled by the server, I need to find a way to protect that macro when I generate it, currently the macro is generated using OpenXml SDK using a VbaProjectPart. I couldn't find anything on the web.
Instead of trying to sign and protect the macro programmatically using Open Xml SDK I decided to download the document, sign it and protect it using word then I used "Open Xml SDK Productivity Tools" to "reverse engineer" the DOCM created and then I copied the binary "VbaProjectPart" created by the tool.
It's not the best way to do it since I need to have a separate documentation for this process and need to do the whole process when the macro changes, however, since the code isn't expected to change anymore I decided to go that way.
Hope this helps anyone who wants to know how to include password protected macros inside an Open Xml document.
I am trying to write a VBA-macro that converts a given MS word document into a sequential list of the document objects contained in that document (e.g., Paragraph, Table, etc.). For each of those objects I want to extract the text contained and its explicit formatting information to save it in a DB.
Would have any pointers for me how to get started? Are there any elegant solutions to this document parsing task?
Without knowing your full requirements this is just some suggestions.
You may be able to do what you want, but it will be a mammoth task to pull apart word documents and be able to stich them back together. If you di dwant to go with this approach, the best might be to pull out paragraphs, images etc and save these sections as individual documents in your database. They can then be put back together using
For i = 1 To ActiveDocument.Paragraphs.Count
MsgBox ActiveDocument.Paragraphs.Item(i)
Next i
ActiveDocument.Content.InsertAfter AnotherDocument
This is incredibly basic and will be a LOT of work to get working correctly.
I wonder would turning the documents into html be better (done simply by saving as HTML) and then you can use open source libraries to allow users to edit parts of the document. Eg add the jeditable plugin for jquery and almost any paragraph in your html word document becomes editable. A simple backend php script to save the changes and you have something that works. You can then also note what has changed for translation purposes.
They docs can be saved back as word docs or pdfs before being sent to the customer
Just an idea.
I'm creating a program in VB.net that does the following:
At a high level I receive a file in email, put the attachment in a monitored folder, import the text file to excel, format the excel, and then email the excel file to a list of recipients.
Here is my plan:
Completed: Outlook VBA to monitor all incoming email for specific message. Once message is received drop attached .txt file in a specific network folder.
Completed: (VB.net) Monitor folder, when text file is added begin processing
Not Complete: (VB.net) Import text file to Excel
Not Complete: (VB.net) Format Excel Text file. (add in a row of data, format column headers with color/size, add some blank columns, add data validation to some of the blank columns that allow drop down selections)
Completed: (VB.net) Save file.
Completed: (VB.net) Send file to list of recipients.
Obviously the items above that are not complete are the bulk of the work, but I wanted to get some advice on what some of you think would be the best way to approach something like this. The import and formatting of the file are causing me some problems because I just can't decide what would be the most efficient way to do this.
What I've thought of so far:
The way stated above. Import to excel -> format
Having a template excel that contains all of the formatting already done for me and attempting to transition the data to this document (no clue if/how I can do this). Is it even feasible? Have the template already created and then import the text file to a new excel file, then transition that data to the excel template?
Something I thought about, in terms of formatting the document, was to record a macro of me doing all of the formatting that I'm going to need and then attempt to convert that macro into my vb.net code, but I'm not sure if that will work. I will need to verify that the text file comes in the EXACT format every time correct?
I really appreciate any advice/suggestions that anyone is willing to give.
You will want to use http://epplus.codeplex.com/
It allows you to create an Excel file from scratch, without having to start Excel itself. Automating Excel will make the process slow and it lacks robustness (Excel process can hang or not close properly).
In addition, using a .Net library allows you to run it on a server or so where no Excel is installed. (Next step would be to inspect the mailbox via POP, IMAP or the Exchange API, so that part doesn't have to be run on a client machine either)
http://msdn.microsoft.com/en-us/library/kh3965hw(v=vs.100).aspx
You can also just use the Interops from MS to interact with Excel, Outlook, Word, etc. They're not difficult at all to use. I'm not familiar with CodePlex, so that may be a better route or an easier one. I just wanted to provide you with an alternative.
With Microsoft Office 2010 Interops you can not generate Office files from .net applications anymore.
You can manipulate data from existing Excel files so you need templates(your 4th point). Then Excel allows you to query some databases. You may be able to simulate one with your folder, otherwise I suggest to convert your .txt files into some databases. (3rd point)
If you do use an older version, you can crate your Excel files by loading them into an instance of Excel and manipulating them as you wish.
By the way I supposed your attached files would have some sort of format.
If you want to manipulate Excel files, I can recommand you the NPOI library found on CodePlex. It has several advantages over OLE-automation:
NPOI is not dependent on a specific Excel version.
Excel (or any other Office component) need not to be installed.
It is faster.
It works with both .XLS and .XLSX files.
We are using a third party software called excel writer. May not be what you are looking for becauseit needs to be license, but it is very fast and the clients does not have to wait for a chart or a data output. Because we have that tool, have not try anything else.